Question on pushing a string to an array


How do you break a string into words and push it into an array?

For example the string "I love to code"
How would I make it look like this?

Array = ["I", "love" , "to", "code"]

Replace this line with your code. 
string = "I love to code"

array = []



This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.