Tech
JavaScript "Variables"
Hi all, I learned about variables in JavaScript recently.
Variables are containers which used to store data.
It can be declared in 4 ways.
Using let
e.g.,
let x = 2 ;
let y = 3 ;
let z = x + y ;
Using Const
e.g.,
const x = 3 ;
const y = 4 ;
const z = x * y ;
Using Var
e.g.,
var a = 1 ;
var b = 1 ;
var c = a - b ;
Automatically
a=10;
b=5;
c...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to