Prettier 2.2.1
Playground link
Input:
Output:
Second Output:
SyntaxError: Unexpected token, expected ";" (1:13)
> 1 | for (let of []);
| ^
2 |
The parens are also needed in for ((let) of []); and for ((let.foo.bar) of []);.
See https://tc39.es/ecma262/#sec-for-in-and-for-of-statements
Originally posted by @thorn0 in #10777 (comment)
Prettier 2.2.1
Playground link
Input:
Output:
Second Output:
The parens are also needed in
for ((let) of []);andfor ((let.foo.bar) of []);.See https://tc39.es/ecma262/#sec-for-in-and-for-of-statements
Originally posted by @thorn0 in #10777 (comment)