unescape-1

 

unescape function will decode the string. In this example, declare a string with value = "Need javascript tips? Visit LearnKode.com", escape will convert to encrypted string and then unescape will convert back to "Need javascript tips? Visit LearnKode.com". See the code snippet: var str="Need javascript tips? Visit LearnKode.com"; var str_esc=escape(str); document.write(str_esc + "

"); document.write(unescape(str_esc))

 
 
 
<!DOCTYPE html> <html> <head> <title>Welcome to LearnKode - A code learning platform</title> </head> <body> <script> var str="Need javascript tips? Visit LearnKode.com"; var str_esc=escape(str); document.write(str_esc + "<br>"); document.write(unescape(str_esc)) </script> </body> </html>
Output