What is the issue with following code? Requirement was to convert “title”
to URL slug, but the test is failing for the input string “Winter Is Coming”.
**Your code so far**
// Only change code below this line
function urlSlug(title) {
return title.toLowerCase().split(" ").join("-");
}
// Only change code above this line
console.log(urlSlug("Winter Is Coming"))
Challenge: Apply Functional Programming to Convert Strings to URL Slugs
Link to the challenge: