Local variables don't continue to exist between function calls but globals ones do.

var a = 5; //this is a number
var b = "5"; //this is a string that happens to be a number.
a == b //this will be true
a === b //this will be false