Espruino/tests/test_eval3.js
2023-03-01 10:24:15 +00:00

7 lines
135 B
JavaScript

result = 0;
(function(){eval(`var x = 42;
print(x); // access the var that was defined here
result = 1;
`)})()
if (global.x) result=0;