URL Slugs not working

URL Slugs not working
0

#1

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.


#2

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


#3

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