The “const” Deception
Articles & Blogs

The “const” Deception

Josh W. Comeau · Apr 24, 2023

<p>The “const” keyword in JavaScript is used to create constants, variables that can't change. Curiously, though, we do seem to be able to edit objects and arrays that are created using “const”. In this tutorial, we're going to dig into the incredibly-important distinction between “assignment” and “mutation” in JavaScript.</p> <div style="margin-top: 50px; font-style: italic;"> <strong><a href="https://www.joshwcomeau.com/javascript/the-const-deception/">Keep reading</a>.</strong> </div> <br /> <br />

Jump to
Projectsbrowse
Peoplebrowse
Companiesbrowse
Saved
Editor
Autosaves as you type