store string in array in javascript code example Example: convert string to array javascript let myArray = str.split(" ");