Yes, foreach, for loop modifies the array in place (ok, you can create a new array, but usually you don't). Just console.log out after each call to compare the different ways.
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.
That was quick - Thanks , I prefer the one-liner ;-)
Else you modify array p[] , or am I missing something here?