Espruino/tests/test_eval.js
Michael Duerinckx 7f5308590b Rename numbered tests to something more descriptive - closes #16
test077 is the only one I really couldn't figure out what it was meant
to test.
2014-03-01 22:15:28 +00:00

11 lines
280 B
JavaScript

/* Javascript eval */
// 42-tiny-js change begin --->
// in JavaScript eval is not JSON.parse
// use parentheses or JSON.parse instead
//myfoo = eval("{ foo: 42 }");
myfoo = eval("("+"{ foo: 42 }"+")");
//<--- 42-tiny-js change end
result = eval("4*10+2")==42 && myfoo.foo==42;