Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // the global variable
- var globalTitle = " Winter Is Coming";
- // Add your code below this line
- function urlSlug(title) {
- return title.split(' ')
- .filter((el) => el !== '')
- .join('-')
- .toLowerCase();
- }
- // Add your code above this line
- var winterComing = urlSlug(globalTitle); // Should be "winter-is-coming"
Add Comment
Please, Sign In to add comment