Examples from things I have some familiarity with:
JavaScript array creation:
var myArray = ["element1", "element2", "bunnies"];
console.log(myArray[2]);
//prints "bunnies"jQuery object (more than just an array):
var divs = $("div");
console.log(divs);
//prints "[0: div.container, 1: div.logo, 2: div.content...]"PHP:
$animals = array("dragon", "giraffe", "hedgehog");
echo $animals[2];
//displays "giraffe"Python Lists (mutable, homogenous):
>>> colors = [['blue', 'red'], ['sage', 'vermillion']]
>>> colors[-1][0]
'sage'And Python Dictionaries (essentially objects/associative arrays):
>>>dict = {'nonfiction': ['Pollan', 'Berners-Lee'], 'fiction': ['Tolkien', 'Asimov']}
>>> dict['nonfiction'][1]
'Berners-Lee'And Python Tuples (immutable, heterogenous):
>>>tup = ('a', 3, -0.2)
>>>tup[1]
3Java (fixed length):
String[] rabbits = {"fuzzy", "hoppy", "ears"};
System.out.println(rabbits[1]);
//prints "hoppy"C (Closest to Java. Info from Learn C the Hard Way. I hadn't touched C before today, forgive me.):
main(){char name[] = "Petunia"; //creates array of chars {'p', 'e', 't'...etc}
printf("name is %s.\n", name);
printf("or also %c %c %c.", name[0], name[1], name[2]);
}
//prints
name is Petunia.
or also P e t.