** urlSlug(" Winter Is Coming")
should return the string winter-is-coming
**
but my returns it I don’t get where am I stuck
Your code so far
// Only change code below this line
function urlSlug(title) {
let a = title.toLowerCase()
a = a.split(" ");
a = a.join(`-`)
return a
}
// Only change code above this line
console.log(urlSlug("A Mind Needs Books Like A Sword Needs A Whetstone"));
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/110.0.0.0 Safari/537.36
Challenge: Functional Programming - Apply Functional Programming to Convert Strings to URL Slugs
Link to the challenge: