Without the var keyword it becomes possible to accidentally create a new variable when you had actually intended to use an already existing variable. e.g.
name = "fred";
...
Name = "barney"; // whoops! we meant to reuse name
Without the var keyword it becomes possible to accidentally create a new variable when you had actually intended to use an already existing variable. e.g.
name = "fred";
...
Name = "barney"; // whoops! we meant to reuse name