In the fiddle - http://jsfiddle.net/vwwkf18c/ or below code snippet -
var a = [3, 4];
var b = [6, 2];
var c = $.extend({}, a, b);
alert(c[1]); //alerts 2
alert(a); //alerts array a contents
alert(c); //does not return contents of c
My questions - 1) After what has been alerted, we can infer that "c" is an object but not an array object. Please confirm. 2) Secondly it is said that internal representation of an array is an object literal, is that right? Which means that array "a" would be stored as given below -
var a = {
0: 3,
1: 4
}
Is it right? 3) How is a or b stored internally and how is it different from the internal representation of "c"?