An array is a container object that holds a fixed number of values of a single type. An array’s length, once created, would remain constant/fixed.
That's not true! Javascript arrays have dynamic size!
You can create an empty array and later add as many items as you want
var arr = [];
arr[0] = 'first';
arr[2] = 'second';
That's not true! Javascript arrays have dynamic size! You can create an empty array and later add as many items as you want
var arr = []; arr[0] = 'first'; arr[2] = 'second';