+ 2
with an array like arr = [a, b, c] you access the content of the array using an index, if I want to get that a value I would access it by writing arr[0]. Associative arrays use names instead of indexes, and stored in pairs name:value, in Javascript associative arrays are objetcts, for example var arr = { name:'Vipul', lastName: 'aggarwal'}. with associative arrays we don't need to now the position of the value in the array and we can access it by; lets take our previous example, if I want to refer to the value of name I write arr.name. This may be different from other langages, but the main idea is the same, refer to values by associating names to them instead of indexes.
31st Dec 2016, 3:36 AM
ADEL MAHJOUB
ADEL MAHJOUB - avatar