Tell us what’s happening:
Describe your issue in detail here.
high guys please help any one the console.output returns winter-is-coming in low cases but freeCodecamp checker says incorrect please anyone who could give me any clarification on this .Thank you
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"))
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36 Edg/113.0.1774.57
Challenge: Functional Programming - Apply Functional Programming to Convert Strings to URL Slugs
yeah i notice that but now how do i fix this because honestly im sure i did everything correct i added join(‘-’) do i add again or what im confused now, because the output displays as if i did not include .join()?
The issue is not with your join, that is just fine. The issue is that you are not taking into account all of the spaces that are in the strings passed into the function.