Why we don't need define variable (var scope = "local")?

Why we don't need define variable (var scope = "local")?
0

#1

Why we don’t need declared with the var keyword ?

function showScope() { 
scope = "local"; return scope; // why we don't need define variable (var scope = "local") ?
}
scope = "global";
print(scope); // displays "global" 
print(showScope()); // displays 
"local" print(scope); // displays "local"

#2

Because you’re not running it in strict mode and javascript historically sucks.