encodeURI-2

 

Example 2 of encodeURI: See the code snippet:

 
 
 
<!DOCTYPE html> <html> <head> <title>Welcome to LearnKode - A code learning platform</title> </head> <body> <p>Encoded URI.</p> <script> document.write(encodeURI('\uD800\uDFFF')); </script> </body> </html>
Output