Array - mmedrano9438/peripheral-brain GitHub Wiki

The Array() constructor creates [Array] objects. Array() can be called with or without [new]. Both create a new Array instance.

`const arrayEmpty = new Array(2);

console.log(arrayEmpty.length); // 2 console.log(arrayEmpty[0]); // undefined; actually, it is an empty slot console.log(0 in arrayEmpty); // false console.log(1 in arrayEmpty); // false `