Answers for "const let var scope"

4

const let var scope

var num = 1;   //var can be function or global scoped
const num = 2; //const can only be block scoped
let num = 3;   //let can only be block scoped
Posted by: Guest on December-19-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language