getiblog

getiblog

9/28/2015

link

http://blog.getify.com/constantly-confusing-const/

summary

In this blog post, the author discusses the confusion and misconceptions surrounding the 'const' keyword in JavaScript. The post delves into the nuanced behavior of 'const' and explains how it does not create 'immutable' variables as commonly believed. It emphasizes that 'const' merely prevents reassignment of a variable, but the value it holds can still be mutated. The author provides examples and clarifies how 'const' works alongside objects and arrays, highlighting potential pitfalls and best practices. Overall, the post aims to provide a clearer understanding of the 'const' keyword and how it should be properly used in JavaScript.

tags

ecmascript ꞏ programming language ꞏ mutable vs immutable ꞏ hoisting ꞏ programming paradigms ꞏ javascript variables ꞏ javascript syntax ꞏ development ꞏ programming ꞏ block scope ꞏ const keyword ꞏ coding concepts ꞏ object-oriented programming ꞏ interview preparation ꞏ coding best practices ꞏ variable scope ꞏ coding standards ꞏ javascript fundamentals ꞏ programming tips ꞏ functional programming ꞏ es6 ꞏ javascript tips ꞏ variable mutation ꞏ software engineering ꞏ scope ꞏ variable assignment ꞏ programming language concepts ꞏ web development ꞏ javascript coding ꞏ coding techniques ꞏ variable declaration ꞏ javascript ꞏ javascript semantics ꞏ computer science ꞏ javascript const keyword