The Key Difference var is function scoped.let and const is block scoped. Letβs see what this means. Function Scope Function scope means if we declare a variable with the var keyword then the variable is accessible for the lifetime of the function inside the entire function in which it is declared. Example: function test() { …