| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Statements#control_flow | [Back] [Original] |
Get to know MDN better
JavaScript if...else
if ()
1;
else
2;
SyntaxError let if
if ()
let i = 0; // SyntaxError: Lexical declaration cannot appear in a single-statement context
var if
if ()
var i = 0;
label: const a = 1; // SyntaxError: Lexical declaration cannot appear in a single-statement context
label: {
const a = 1;
}
if () {
let i = 0;
}
| Web Proxy Viewer | New URL | Original Page |