December 2013
Intermediate to advanced
384 pages
9h 54m
English
var s = "In The Darkness Bind Them"; s.charAt(7); //returns 'D' s[7]; // also returns 'D'
String objects provide the charAt(offset), which returns the character contained at the offset specified. Also, strings in JavaScript are basically arrays of characters, so you can get the character at a specific offset using stringName[offset]. Keep in mind that the offsets are always zero based, so their first character is at offset 0.
Read now
Unlock full access