Brian Rinaldi is a Developer Experience Engineer at LaunchDarkly with over 20 years experience as a developer for the web. Brian is active in the community running CFE.dev and Orlando Devs.
const is a little more complex than what you have here. The reference is immutable, but the value is not. So something like...
constfoo={bar:"bar"};foo.bar="foo";
...will not generate an error.
If this all confuses you a bit like it does me, tools like JSLint can help you determine when it may be more appropriate to change a let to a const. 😀
(Also, sorry for the self-promotion, but since the other commenter mentioned Kyle Simpson and it is relevant to your post, I am running an online training on JavaScript language fundamentals that features Kyle and 3 other fantastic trainers - knowjs.org)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
const
is a little more complex than what you have here. The reference is immutable, but the value is not. So something like......will not generate an error.
If this all confuses you a bit like it does me, tools like JSLint can help you determine when it may be more appropriate to change a
let
to aconst
. 😀(Also, sorry for the self-promotion, but since the other commenter mentioned Kyle Simpson and it is relevant to your post, I am running an online training on JavaScript language fundamentals that features Kyle and 3 other fantastic trainers - knowjs.org)