Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

get the character code in a string

const sentence = 'Hello, World!';

const index = 0;

console.log(`The character code ${sentence.charCodeAt(index)} is equal to ${sentence.charAt(index)}`);
 
PREVIOUS NEXT
Tagged: #character #code #string
ADD COMMENT
Topic
Name
7+2 =