Closed gfwilliams closed 1 year ago
also array index access
>(function(){"jit";var i=0,a=Uint8Array(1);a[0]=1;return a[i];})();
Uncaught Error: Field or method "i" does not already exist, and can't create it on Uint8Array
at line 1 col 65
...y(1);a[0]=1;return a[i];})();
workaround is using a[i.ToString()]
Thanks @fanoush - just fixed that too
a && b
/a || b
Discussed at https://forum.espruino.com/conversations/382898/#comment16823779
It's not a bug, it's just not implemented yet. Because
&&
is a short-circuiting operator it's not quite as simple as doing&
with booleans, but it shouldn't be a huge problem (it's just the 'if' code).a = [1,2,3]
This one shouldn't be too hard, and is very useful when trying to do stuff like draw polylines
a = { b : 42 }
Again, pretty useful especially when calling some built-in functions. Probably not that hard either.