Functional Programming: Apply Functional Programming to Convert Strings to URL Slugs help please

// the global variable
var globalTitle = " Winter Is  Coming";

// Add your code below this line
function urlSlug(title) {
  let arr = title.toLowerCase().split(" ");
  let result = arr.filter((element) => {
    if (element != "") {
      return true;

  return result;  
// Add your code above this line

var winterComing = urlSlug(globalTitle); // Should be "winter-is-coming"

I am not able to pass The globalTitle variable should not change. test case. I don’t get it how am I changing globalTItle? How do I fix it.

You added extra spaces to globalTitle