Problem with correction

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 :slight_smile:
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:

When I copy and paste this into the challenge, the code passes just fine for me.

You have and extra space before the “W” and before the “C” in globalTitle. That is not in the original problem.


you have not respected this line

1 Like

Thank you, that is the problem