1 min readMay 11, 2020
It’s not the value that i holds which is passed, in closures it holds the reference of i. So the last value held by i is 5 and that’s what stored in its reference.
It’s not the value that i holds which is passed, in closures it holds the reference of i. So the last value held by i is 5 and that’s what stored in its reference.
JS Enthusiast, with a passion for travelling and writing.