Var:
Function or glopal scope, can be re-declared and updated.
var x = 10;
var y = 20; ---> re-declartion allowed
console.log("var:",x) => 20
Let:
Block scope, can be updated but not re-declared in same block.
let y = 30;
y = 40; ---> updated allowed
console.log("Let:", y) => 40
Const:
Block scope, can't be reassingned.
const z = 50;
console.log("const:", z) => 50
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)