var meaning in javascript code example
Example 1: how to define variable in javascript
var <variable-name>;
var <variable-name> = <value>;
Example 2: javascript define variable
var variable1 = "some variable content";
Example 3: js what does var mean
Used to create a variable that is globally scoped when not used in a function.
When it is used in a function, it can only be used in that function and not
outside of it. This statement is comparable to let but more globalized.