Espruino/tests/test046.js
Gordon Williams f3d6e0bc83 First commit
2013-09-26 14:39:04 +01:00

16 lines
228 B
JavaScript

// test IF IN syntax
var a = [0,1,2,3];
var b = ["A","B","C"];
var c = { hello : "there" };
var z =
(1 in a)?0:1 +
(4 in a)?2:0 +
("C" in b)?0:4 +
("D" in b)?8:0 +
("hello" in c)?16:0 +
("there" in c)?0:32;
result = z==0;