how to create array in numbers javascript code example Example: building an array of a numbers javascript const arr = [...Array(2)] // output [undefined, undefined]