1
Reply

What is the difference between let and var?

Bhargava Ch

Bhargava Ch

5y
2.7k
0
Reply

    ‘Let’ is the keyword which can be used in specific to scope. It will not mutate global variables. Let is the recommended way.
    ‘Var’ key word is also used to define the value of property but this is accessbile globally thoroughout the script. Use var if you are sure that this global variables are no where interacting with local variables.