charCodeAt-1

 

charCodeAt-1

 
 
 
<!DOCTYPE html> <html> <head> <title>Welcome to LearnKode - A code learning platform</title> </head> <body> <button onclick="findUnicode()">Display the unicode</button> <p id="sample"></p> <script> function findUnicode() { var str = "HELLO WORLD"; var n = str.charCodeAt(0); document.getElementById("sample").innerHTML = n; } </script> </body> </html>
Output