1 2 3 4 5 6 7 8
var caught = false; try { eval("1\n)=>"); } catch (e) { assertEq(e instanceof SyntaxError, true); caught = true; } assertEq(caught, true);