What is the differe…
 
Notifications
Clear all

What is the difference between var , let and const keyword in JavaScript?

1 Posts
2 Users
0 Likes
190 Views
0
Topic starter

What is the difference between var , let and const keyword in JavaScript?

1 Answer
0
  • var: Function-scoped, hoisted, can be re-declared and updated.
  • let: Block-scoped, hoisted, can be updated but not re-declared.
  • const: Block-scoped, hoisted, cannot be reassigned, but object/array properties can be modified.
Share: