| 1 |
// This Source Code Form is subject to the terms of the Mozilla Public |
| 2 |
// License, v. 2.0. If a copy of the MPL was not distributed with this |
| 3 |
// file, You can obtain one at http://mozilla.org/MPL/2.0/. |
| 4 |
|
| 5 |
js> version(170) |
| 6 |
0 |
| 7 |
js> function f(a,b,c) { |
| 8 |
> let sum = a + b + c; |
| 9 |
> return sum / 3; |
| 10 |
> } |
| 11 |
js> f.toString() |
| 12 |
|
| 13 |
function f(a, b, c) { |
| 14 |
let sum = a + b + c; |
| 15 |
return sum / 3; |
| 16 |
} |
| 17 |
|
| 18 |
js> try { |
| 19 |
> eval("function f() { for (;;) let a=3; return 3; }"); |
| 20 |
> } catch (e) { |
| 21 |
> e; |
| 22 |
> } |
| 23 |
SyntaxError: SyntaxError: let declaration not directly within block |