URL Slugs not working

https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/functional-programming/apply-functional-programming-to-convert-strings-to-url-slugs

let slug = globalTitle.toLowerCase().split(" ").join("-");
return slug;

Why wouldn’t this code pass the test? is not as valid as using regex and filter?
Besides, the request is not to use replace.

Use the title parameter instead of the globalTitle variable. It still won’t solve everything though

1 Like

Good spot. Thank you.
Still. It´s working on codepen, not in FCC.
EDIT: Aaaah… hold on. Found out why.

1 Like