Prev Demo
Charcodeat For Returning The Different Characters Unicode Values In A String
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Demo</title> </head> <body> <p>Click on the "Button" for returning the Unicode of different characters of a string "SN ITFunda Service LLP".</p> <input type="button" value="Button" onclick="Function()" /> <p id="myId"></p> <script> function Function() { var a = "SN ITFunda Service LLP"; var res = "2nd character unicode from Start:" + a.charCodeAt(1) + "</br>" + "2nd character unicode from End:" + a.charCodeAt(a.length - 2) + "</br>" + "3rd character unicode from Start:" + a.charCodeAt(2) + "</br>" + "3rd character unicode from End:" + a.charCodeAt(a.length - 3); document.getElementById("myId").innerHTML = res; } </script> </body> </html>
Note: We DO NOT save your trial code in our database.
Output