Booklet

author

elya_trm

Development

VAR vs LET vs CONST - Javascript

VAR vs LET vs CONST - Javascript

VAR - Before ES6, the 2015 standardised version of JavaScript, came out, there was just one way of declaring a variable: with var. One problem with var and the reason it was replaced. Var allows you to declare the variable as many times as you want. Imagine you're working in a team and you declare var action and then your teammate declares same var action again so your action has another value now!

LET - let is the new ES6 way of declaring a variable that can be re-updated (attention: not re-declared!).

CONST - Variables declared with the const maintain constant values. As the name suggests, they cannot be updated or re-declared.

More booklets by elya_trm

  • booklet-slide-images
  • booklet-slide-images
  • booklet-slide-images
  • booklet-slide-images
  • booklet-slide-images
  • booklet-slide-images
  • booklet-slide-images
  • booklet-slide-images
  • booklet-slide-images
  • booklet-slide-images

More Development booklets

Your recently viewed booklets

  • booklet-slide-images
  • booklet-slide-images
  • booklet-slide-images
  • booklet-slide-images
  • booklet-slide-images
  • booklet-slide-images
  • booklet-slide-images
  • booklet-slide-images
  • booklet-slide-images
  • booklet-slide-images
See all booklets