On the latest version 1v82 of Espruino?
var foo = ["keep", "onInit", "SPI", "SPI2", "Ethernet", "eth", "Server", "Socket", "Serial", "Pipe", "LoopbackA", "LoopbackB", "fullreset", "reset"]; foo.forEach(function(n) { console.log(n, foo.indexOf(n)); }); keep 0 onInit 1 SPI 2 SPI2 3 Ethernet 4 eth 5 Server 6 Socket 7 Serial 8 Pipe 9 LoopbackA 10 LoopbackB 11 fullreset 12 reset 13
So for me, that works perfectly. I tried it with Object.keys(global) too and it works fine.
Object.keys(global)
@Gordon started
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.
On the latest version 1v82 of Espruino?
So for me, that works perfectly. I tried it with
Object.keys(global)
too and it works fine.