4 ms·
The noteworthy bit is that declarations are valid in the conditional "expression" of if-statements and evaluate to the declared variable. It's imo not obvious t
by ben0x539 14y ago
The noteworthy bit is that declarations are valid in the conditional "expression" of if-statements and evaluate to the declared variable. It's imo not obvious that declarations are expressions sometimes.
- deleted 14y ago[deleted]
- deleted 14y ago[deleted]
- Sharlin 14y agoTo be precise, declarations are never expressions - there are two forms of if and while statements in the grammar, one taking an expression and the other a declaration.