How to receive in JS selections from html using select2

I want to receive in JS the selected values from html. In html I’m using multi-select box with selected2 library. I was able to do it for a normal single choice such as