Yes, it is. It was only added within the last month or two though. I've just discovered that prefix increment isn't in there yet (and I think you have a typo after 'i=0'), however the following code works fine:
function add() {
var i, len, result = 0;
for (i = 0, len = arguments.length; i < len; i++) {
result += arguments[i];
}
return result;
}
add(3, 7, 4, 6); //result = 20
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.
Hi,
Yes, it is. It was only added within the last month or two though. I've just discovered that prefix increment isn't in there yet (and I think you have a typo after 'i=0'), however the following code works fine: