Thanks for pointing that out. I just made an edit to the post to address this.
I still would recommend using const for objects and arrays since mutating an existing array or object. This way I can stick with this rule. When I create a new object after mutating it (common in React), JavaScript will force me to use a variable.
const c = { b: 1 };
c = {...c, b: 42};
What's most important is for the team members to be on the same page and use linters if possible to codify the understanding.
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.
Thanks for pointing that out. I just made an edit to the post to address this.
I still would recommend using
const
for objects and arrays since mutating an existing array or object. This way I can stick with this rule. When I create a new object after mutating it (common in React), JavaScript will force me to use a variable.What's most important is for the team members to be on the same page and use linters if possible to codify the understanding.