Tell us what’s happening:
Describe your issue in detail here.
My Code looks correct but I keep failing the third condition which is " Winter is coming". I use the combined methods of trimStart, split and join. When I console log the function I get the correct result. Can anyone please tell me where I am doing wrong and how to pass this lesson.
Your code so far
// Only change code below this line
function urlSlug(title) {
return title.trimStart().toLowerCase().split(" ").join("-");
}
// Only change code above this line
console.log(urlSlug(" Winter is Coming"));
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36
.
Challenge: Apply Functional Programming to Convert Strings to URL Slugs
Link to the challenge: