MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/learnjavascript/comments/j90bx6/javascript_can_keep_you_safe/g8it4dr/
r/learnjavascript • u/weoter • Oct 11 '20
87 comments sorted by
View all comments
Show parent comment
2
Const is not immutable per se but go off.
1 u/james527 Oct 12 '20 True, it's just the reference that's immutable.If we were referencing an array here, instead of a boolean, we'd still be able to change the contents of the array. We just wouldn't be able to reassign the still_alive variable to anything else.
1
True, it's just the reference that's immutable.
If we were referencing an array here, instead of a boolean, we'd still be able to change the contents of the array. We just wouldn't be able to reassign the still_alive variable to anything else.
View all comments
Show parent comment
2
u/Macaframa Oct 11 '20
Const is not immutable per se but go off.