Last updated 3 years ago
What does Array.apply do in this method?
Array.apply
Array.apply(null, {length: 100}).map(Function.call, Math.random)
As you probably know, Function.prototype.apply allows you to provide arguments to a function in the form of an array.
Function.prototype.apply
So calling Array.apply (which just inherits its .apply() method from Function's prototype)
.apply()
Any function that is an Instance of Function would allows you to inherit the .apply mrethods
.apply