133
rated 0 times
[
139]
[
6]
/ answers: 1 / hits: 58580
/ 10 Years ago, thu, january 8, 2015, 12:00:00
In Javascript, why is
var myArray = new Array(3);
different from:
var otherArray = [null, null, null];
?
Obs: (myArray == otherArray)
returns false
.
And also, how can I get a variable like otherArray
, which is an array full of 'nulls`, but with whatever size i'd like?
Obs
[undefined, undefined, undefined]
is also not equal to myArray.
More From » arrays