Monday, May 15, 2017

ES6 prototype.fill

This bit of JavaScript is going to set whatever to an array that is thirteen items long and then put undefined in each of the thirteen positions.

this.whatever = new Array(13);
this.whatever.fill(undefined);

 
 

...I think.

No comments:

Post a Comment