Tell us what’s happening:
The solution looks a lot like what I wrote but mine doesn’t work. probably because its in 2 lines? can someone help me with what the rule is on this?
Your code so far
function sentensify(str) {
// Only change code below this line
str.split(/\W/);
return str.join(" ");
// Only change code above this line
}
sentensify("May-the-force-be-with-you");
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.1; ) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36
.
Challenge: Combine an Array into a String Using the join Method
Link to the challenge: