Re:What’s New in ES2019
by munificent on Tuesday July 30, 2019 @01:25PM
(#20567016)
The new one shadows it.
[ Parent
| on HN ]
Re:What’s New in ES2019
by dotancohen on Wednesday July 31, 2019 @08:54AM
(#20574002)
Local scope might not be what the programmer wants, though, depending on circumstance. Pseudocode:
i = 3;
foo = \0;
while ( i-- ) {
if ( foo = resultFromFooApi() ) {
break;
}
sleep 1;
}
return foo;