<<<<<<< HEAD Code Wars - Brett Crafton

Convert a string to an array

Question

Write a function to split a string and convert it into an array of words.

* "Robin Singh" ==> ["Robin", "Singh"] * "I love arrays they are my favorite" ==> ["I", "love", "arrays", "they", "are", "my", "favorite"]

Solution by -

My Solution


	function stringToArray(string){

		return string.split(' ')}
				

Try it yourself - CodeWars

======= Code Wars - Brett Crafton

Convert a string to an array

Question

Write a function to split a string and convert it into an array of words.

* "Robin Singh" ==> ["Robin", "Singh"] * "I love arrays they are my favorite" ==> ["I", "love", "arrays", "they", "are", "my", "favorite"]

Solution by -

My Solution


	function stringToArray(string){

		return string.split(' ')}
				

Try it yourself - CodeWars

>>>>>>> 0e614172debaa009c8d31330edbeb3b765b59c39