DEV Community

Discussion on: Understanding closures in Javascript - Javascript weekly

Collapse
 
kor3k profile image
kor3k • Edited

1 2 3 because the scope of doIncrement() persists between increment() calls, which makes counter static-like variable

Collapse
 
ganeshmani profile image
GaneshMani

Great