arguments.length can never be less than the actual number of arguments - unfortunately this is a side-effect of the way Espruino works, and we could either make everything slower/use more memory or we could put up with it. It's something I know about and is documented, and is somewhere Espruino doesn't follow the spec.
accessing an element of arguments that is undefined raises an error - this is a really weird bug since if you do z=arguments and then use that variable then you're fine. I've just raised an issue for that here: https://github.com/espruino/Espruino/issues/1691
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 just working my way through the forum and I don't have time to read all of this thread, but @maze1980's post looks spot on to me... http://forum.espruino.com/conversations/337375/#14864281
arguments.length
can never be less than the actual number of arguments - unfortunately this is a side-effect of the way Espruino works, and we could either make everything slower/use more memory or we could put up with it. It's something I know about and is documented, and is somewhere Espruino doesn't follow the spec.accessing an element of arguments that is undefined raises an error - this is a really weird bug since if you do
z=arguments
and then use that variable then you're fine. I've just raised an issue for that here: https://github.com/espruino/Espruino/issues/1691