charCodeAt Method

Top  Previous  Next

Return the  Unicode of the character at the specified index in a string.

Syntax

String.charCodeAt(number)

Arguments

numberA number representing the index of the character you want to return.

Return Value

Unicode of the character at the specified index.

Examples

var String = "HELLO CELLSCRIPT";

var n = String.charCodeAt(2);

Net.write(n);
           // Returns 76