Are strings also arrays?


#1

From chapter 4.

You can treat a string like an array of characters. For instance, you know that

var myArray = ['hello', 'world'];
myArray[0];    // equals 'hello'

But this also works on strings!

var myName = 'Eric';
myName[0];    // equals 'E'

#2

@calydon,
Do google search
== discussions / opinions ==
javascript is a string an array site:stackoverflow.com
for instance
http://stackoverflow.com/questions/4051385/javascript-access-string-chars-as-array