how to pass a string into an array js code example Example: convert string to array javascript let myArray = str.split(" ");