DEV Community 👩‍💻👨‍💻

Discussion on: Happy Little Accidents - Debugging Javascript

hamatti profile image
Juha-Matti Santala Author

A colleague of mine brought up an interesting behavior in console.log that I wasn't aware of. Because of how things are evaluated, sometimes your console.log might end up loading lazy and thus resulting in results you didn't expect.

There's a good discussion about this and explanation of how it works and how to go around it in Stack Overflow:

moopet profile image
Ben Sinclair

I think that's pretty out of date (2010?) and it doesn't behave that way in current versions of Chrome.