Hello,
Any variable that is initialized inside a function using the var keyword will have a local scope. If a variable is initialized inside a function without var, it will have a global scope. A local variable can have the same name as a global variable.
i.e. If you declare a variable inside function without using var keyword, then it will be a global variable. That it the difference.