function sentensify(str) {
// Add your code below this line
return str.split(/W+/);
// Add your code above this line
}
sentensify("May-the-force-be-with-you");
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.79 Safari/537.36.
I was trying to work a weirder approach where more characters separate the string. Trying to accumulate those weird characters and next use them to replace (not with replace) them. It might work without split and join. Still not efficient or clean.