Sitemap
Dhileep

Dhileep

JavaScript Variables

Sep 1, 2024

Hi all !
In this blog I am going to learn and explore to teach you and you can be a part of my learning process

VARIABLES

There are three types of variables

You can’t create a copy of variable a , b , c again But you can modify or update a variable

INPUTS:

OUTPUTS:

you can modify or update a variable using VAR ,LET but we can’t modify CONST

Get Dhileep’s stories in your inbox

Join Medium for free to get updates from this writer.

INPUT

OUTPUT:

But we Can modify the CONST variable using ARRAY and OBJECT
example:

output:

Here you can see that CONST C had been Changed or Modified
same like Const C =OBJECTS;

INPUT:

OUTPUT:

Summary
1. var
and let allow changes to variables.

2. const is immutable, but you can modify the contents of arrays or objects defined with const.

--

--