3 ms·
new Array(1000); ?
by bawolff 6y ago
new Array(1000); ?
- franky47 6y agoTry iterating on it, it won't work. This creates 1000 "empty slots".
- jholman 6y agoIn addition to franky47's more important point, I'll add that `new Array()` and `Array()` are equivalent.
- The_rationalist 6y agoIn java it would be default initialized but it isn't in js