Convert this to work with Wix Code?

Hi,
Can you explain what are you trying to achieve with this code sample?
Saving to a collection the tags the user selected?