Forum How do I...?

Filling a newly created array by null

dejudicibus
I have the following instruction in a JavaScript of mine. The script works perfectly in any browser.

var prevItem = new Array(nsel).fill(null);


where nsel is an integer greater than zero.
However if I run it in Prince I get the following error on that line of code:

TypeError: value is not an object.


Any idea why? I have the same error even if I write:

var prevItem = new Array(nsel);
prevItem.fill(null); 
mikeday
Prince does not yet support the Array fill method.
mikeday
We have added support for the Array fill method to the latest build, thanks for letting us know! :D
dejudicibus
Wow... good job. Thank you.