I need to display the results after running my code. Purpose is to catch the error. Console.log command won’t display no matter where I place it.
I therefore know that code does not pass certain element of the test, but don’t know why.
How to display results after running my code?
Many thanks.
Your code so far
// The global variable
var globalTitle = "Winter Is Coming";
// Only change code below this line
function urlSlug(title) {
return title
.toLowerCase()
.split(/\s+/g)
.join('-')
//Where to place console.log command to see the results?
}
// Only change code above this line
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36.
Challenge: Apply Functional Programming to Convert Strings to URL Slugs