For instance, in Lua and Python:
num = 3;
On the other hand, other languages like JavaScript use ‘var’:
var num = 3;
I presume that the use of ‘var’ word should be fast to parse “var num = 3” as a variable declaration than “num = 3” (or am I wrong?).
So, why same script languages doesn’t use a “var” word to the variable declaration?
Is it irrelevant?
The are several possible reasons:
foo = 1andvar foo = 1do different things)varin implicitly type variables, but keeping it makes the language consistent)