Javascript: var, let , const – Uses cases, Differences, Interview questions

var, let & const in Javascript in detail. Use cases of var, let & const in js. Common interview questions on var, let & const differences, and how to use in practice. Advantages of using var, let & const.

var

  • Can be declared as many times we want.

let

  • We cannot re-declare a variable using let

It will give us an error

const

  • We cannot redeclare a variable using const

About the Author: smartcoder

You might like

Leave a Reply

Your email address will not be published. Required fields are marked *