javascript join array elements as string code example
Example 1: 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>
Example 2: js array join
['h', 'e', 'y'].join('')
// hey