I would like to you Array.prototype.map
method on an array of given length to initialise it with the objects. Note that I do not intend to any kind of loop here.
I had an idea to this as
cells = Array(numberOfCells).map(() => new Cell());
However, this does not work. Could somebody point out why and suggest a solution of a similar kind?