var myArray = new Array(3); . , myArray otherArray . , , undefined, . - , myArray . .
,
var a = new Object();
var b = new Object();
console.log(a===b);
:
var customerA = { name: "firstName" };
var customerB = { name: "firstName" };
console.log(customerA===customerB);
, var myArray = new Array(3) , .
If you try this:
var array = [1,2,3];
console.log(Object.keys(array));
you will get as a result:
["1","2","3"];
If you try this:
var array = new Array(3);
console.log(Object.keys(array));
you will get as a result:
[]
source
share