Chapter 1: Three Keys to the Kingdom
Timothy stared at his browser console in complete confusion. He'd written what seemed like simple J...
For further actions, you may consider blocking this person and/or reporting abuse
Interesting questions! Playing around with let and const reminded me how important clear structure and encapsulation are — something we focused on while building QVista to make workflow automation visual, organized, and easy to manage.
The use of
const,letandvarin the post is the common agreement in the community.I think the biggest pain point is the use of
const. While it is a constant for primitives like strings and floats, when you are using it on arrays of objects it is not that much of a constant.For me working with objects or arrays I use
letwhen the variable should not be exposed. Otherwise I usevar.The reason block scopes are safer from overwriting has to do with the fact that javascript has no namespacing build in. The emulation of namespaces is nesting variables in objects.
Thanks David! You've identified the issue that trips people up—const protects the binding, not the contents. Your point about arrays and objects is perfect. The namespacing insight about block scope is excellent too—that's the real nice thing with let and const. Cheers buddy! ❤
Cool article
Thanks Chizi. Have a good one! ❤️
Nice article! Very well explained and detailed information
Very well expleined! Congrats!👏👏👏
Thanks Theodora. Cheers!
Great explanation! 👏
Thank you, Rishit. Cheers! ❤
Neatly written
thanks! cheers Abhinav ❤
Thanks for this clarification!
My pleasure, Laurent! I'm glad it landed clearly. This series is all about making the confusing parts of JavaScript actually make sense. More chapters coming on this, prototypes, and the event loop. Thanks for reading! ❤