You need to sign in or sign up before continuing.
rewrite while/do-while loops as functions, as appropriate
while ( i-- ) {
const _i = i;
setTimeout( () => console.log( _i ) );
}
while ( i-- ) {
const _i = i;
setTimeout( () => console.log( _i ) );
}