unescape-2

 

Example 2 of unescape function:

 
 
 
<!DOCTYPE html> <html> <head> <title>Welcome to LearnKode - A code learning platform</title> </head> <body> <button onclick="replaceWithCharacters()">Show the original string</button> <p id="sample"></p> <script> function replaceWithCharacters() { var a=unescape("abc123") + "<br>"; var b=unescape("%E4%F6%FC") + "<br>"; var c=unescape("%u0107") + "<br>"; result=a+b+c; document.getElementById("sample").innerHTML = result; } </script> </body> </html>
Output