Is there a more compact way to do this sort of initialization?
for (var i = 0; i < arraySize; i++) array[i] = value;
I think this is nice, short and elegant:
// assuming `value` is what you want to fill the array with // and `arraySize` is the size of the array Array(arraySize).fill(value);