- Getting Started
- Variables and Types
- Manipulating Arrays
- Function Context
To define an array, either use the brackets notation or the Array object notation:
var myArray = [1, 2, 3]; var theSameArray = new Array(1, 2, 3);
We can use the brackets
 operator to address a specific cell in our array. Addressing uses zero-based indices, so for example, in
myArray the 2nd member can be addressed with index 1.
print(myArray); // prints out 2
var myArray =  myArray = "hello" print(myArray);
Will print out:
[undefined × 3, "hello"]
Define an array with the following three variables:
- A string set to "What is the meaning of life?"
- A number set to
- A boolean set to
Please sign in or sign up to submit answers.
Alternatively, you can try out Learneroo before signing up.