Combine an Array into a String Using the join Method challenge

why is my code not passing??
Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**

function sentensify(str) {
// Only change code below this line
return str.split(/[,. \s]/).join(" ");

// Only change code above this line
}

console.log(sentensify("May-the-force-be-with-you"));
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:99.0) Gecko/20100101 Firefox/99.0

Challenge: Combine an Array into a String Using the join Method

Link to the challenge:

You are splitting the input string only on comma, space and dot, not on hyphen.
You may need to use the regex for special characters here.

thanks i figured it out

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.