charCodeAt() using strings in JS

charCodeAt() using strings in JS



<!DOCTYPE html>
<html>
<head>
<title>Test page</title>
<script type="text/javascript">

/*charCodeAt  will return the ASCII CODE of the character at
 that particular position of the string*/

var a = "A HEY !! THIS IS THE TASK";

var b = a.charCodeAt(0);

console.log(b);



</script>

</head>
<body>
<h1></h1>
</body>
</html>



Comments

Popular posts from this blog