Answers for "const var and let"

2

difference in var let and const

var: 
	* hoisted(global scope)
    * function scope
let:
    * block scope
    * reassignable
    * not redeclarable
const: 
    * block scope
    * not reassignable
    * not redeclarable
Posted by: Guest on August-10-2021
0

const let var

var greeter;
    console.log(greeter); // greeter is undefined
    greeter = "say hello"
Posted by: Guest on March-30-2021

Browse Popular Code Answers by Language