/..

Dark Mode

Enable Console

The Function

stringToArray('')
stringToArray(string)

/*
  Converts a string into an array of words
*/

stringToArray("Hello there");
// ["Hello", "there"]

stringToArray("Convert this into an array");
// ["Convert", "this", "into", "an", "array"]

Solution by - Need4Swede

How it works

function stringToArray(string){

  // Split the string into an array, seperated by whitespaces and return the outcome
	return string.split(" ");

}

Try it yourself - Codewars Source

You can also use my built-in JavaScript console