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