Tell us what’s happening:
Hi, for some reason I cannot pass this challenge despite meeting all requirements.
I have, as usual, double-checked with console.log() - my best friend
Seems to me like a bug, might be worth reporting.
I copy / paste the solution now in order to proceed tho it’d be nice to know why this happens.
Your code so far
// The global variable
var globalTitle = "Winter Is Coming";
// Only change code below this line
function urlSlug(title) {
let newArr = title.slice();
return newArr.split(/\s+/).join("-").toLowerCase();
}
// Only change code above this line
console.log(urlSlug(globalTitle))
console.log(globalTitle)
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0
.
Challenge: Apply Functional Programming to Convert Strings to URL Slugs
Link to the challenge:
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/functional-programming/apply-functional-programming-to-convert-strings-to-url-slugs