Tell us what’s happening:
I have just made the challenge like it is in the solution and It is always throws the error:
The globalTitle
variable should not change.
And I have tried to set a local variable to work inside the function slicing the string and it still throws the error.
I think it is a problem with the correction sistem because I also tried to just copy and paste the solution and also fails.
I need help please
Your code so far
// The global variable
var globalTitle = " Winter Is Coming";
// Only change code below this line
function urlSlug(title) {
return title.toLowerCase().trim().split(/\s+/).join("-");
}
// Only change code above this line
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0
.
Challenge: Apply Functional Programming to Convert Strings to URL Slugs
Link to the challenge: