JavaScript has local ans global variable scopes