Hi there, I would like to know why simply \s as for RegEx for whitespace did not work.
Your code so far
function splitify(str) {
// Add your code below this line
let x= str.split(/\s/);
return x;
// Add your code above this line
}
splitify("Hello World,I-am code");
console.log(splitify);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/functional-programming/split-a-string-into-an-array-using-the-split-method