News for hackers. Stuff that matters.
Re:JavaScript variables: var and let and const by threatofrain on Friday March 06, 2020 @02:35PM (#22506511)
In JS, I think of any reference to an object as a pointer, and the <pointer> is immutable even if its contents aren't; then everything in JS which can be considered a value which is immutable under const.

IMO it's not just a problem of const vs let, because it'll pop up again when you're trying to copy a JavaScript object, and it'll pop up again when someone has questions about garbage collection.

There are no comments on this comment yet.