Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const urlEncode = function(text) {
- return text.trim().split(' ').join('%20');
- };
- console.log(urlEncode("Lighthouse Labs"));
- console.log(urlEncode(" Lighthouse Labs "));
- console.log(urlEncode("blue is greener than purple for sure"));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement