convert string to arrahy code example
Example 1: javascript turn string into array
var fruits = 'apple, orange, pear, banana, raspberry, peach';
var ar = fruits.split(', '); // split string on comma space
console.log( ar );
// [ "apple", "orange", "pear", "banana", "raspberry", "peach" ]
Example 2: how to change string to array in javascript
a=anyElement.all
// console.log(a)
Array.from(a).forEach(function (element){
console.log(element)
})