DEV Community

skptricks
skptricks

Posted on

Understanding Const In Javascript With Examples

Post Link : Understanding Const In Javascript With Examples

This tutorial explains how to use const keyword in javascript. const statement values can be assigned once and they cannot be reassigned. The scope of const statement works similar to let statements.

const :- It has block level scoping but cannot change the value reference.
Point To Remember :
Variables defined with const behave like let variables, except they cannot be reassigned.
we cannot change constant primitive values, but we can change the properties of constant objects.

Understanding Const In Javascript With Examples

Top comments (0)