DEV Community

Discussion on: Optimized way to iterate over the length in js loop?

Collapse
 
atwright147 profile image
Andy Wright

As far as I know there is no difference there. The length property isn't calculated when you access it is calculated when you push, pop etc

Collapse
 
inrsaurabh profile image
Saurabh Ranjan

You mean internally it's been tracked that when stackTrace is updated ?

Collapse
 
atwright147 profile image
Andy Wright

Sorry, I don't understand your comment