Combine an Array into a String Using the join Method error

Tell us what’s happening:

i am stuck here

Your code so far

function sentensify(str) {
  // Add your code below this line
   var arr=str.split(/W+/);
  var str = arr.join(" ");
  return str;
  // Add your code above this line

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.79 Safari/537.36.

Link to the challenge:

Hi @ljgpok

I assume you wanted the “Any non-word character” token here. A token starts with a \ so you’d need to change your code to reflect that. At the moment you’re code is looking for 1 or more literal W characters in the string.