charAt Method

Top  Previous  Next

Returns the specified character of a string.

Syntax

String.charAt(number)

Arguments

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

Return Value

A string which represents the character at the specified index.

Examples

var String = "HELLO CELLSCRIPT";

var n = String.charAt(2;  

Net.write(n);          // Returns L