535-encode-and-decode-tinyurl

DevGod
Vtuber
/** * Encodes a URL to a shortened URL. * * @param {string} longUrl * @return {string} */var encode = function(longUrl) { return btoa(longUrl)};
/** * Decodes a shortened URL to its original URL. * * @param {string} shortUrl * @return {string} */var decode = function(shortUrl) { return atob(shortUrl);};
/** * Your functions will be called as such: * decode(encode(url)); */