How am I affecting the global variable here?

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

Hello,
I’m passing all tests except the first one. It seems as though I am inadvertently affecting the globalTitle variable but I don’t see how. I added an additional variable layer “str” and consoled the heck out of it and it always seems to match the original.
Thoughts?
-J

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

function urlSlug(title) {
  let str = title;
  let str1 = str.toLowerCase().split(" ").filter(fun).join("-");
  console.log(globalTitle);
  return str1;
}
console.log(globalTitle);
function fun(text){
  return text != "";
}
console.log(globalTitle);
var winterComing = urlSlug(globalTitle); // Should be "winter-is-coming"

you have changed globalTitle from the original value it had in the starting code

suggestion for next time: don’t change a global value already there, but change the function call

Oh during my test I manually changed it… haha what a doof!
Thanks!
-J