join an array to make a string javascript code example
Example 1: js array join
['h', 'e', 'y'].join('')
// hey
Example 2: join array javascript
<html>
<select multiple class="select-colors">
<option>blue</option>
<option>green</option>
</select>
</html>
<script>
var myColorSelect = $(".select-colors").val().join();
console.log(myColorSelect);
</script>