Also, if you're after storing a whole lot of readings, maybe look at using Uint8Array/etc as they'll be vastly more efficient when storing large amounts of data.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I'm afraid Espruino doesn't support setting the array length - however it's trivial to work around.
You can use either of:
Also, if you're after storing a whole lot of readings, maybe look at using Uint8Array/etc as they'll be vastly more efficient when storing large amounts of data.