Javascript does not throw up errors when I forget to use var to declare a variable. Much time was lost debugging because of careless mistakes like these.
What are the best practices to avoid forgetting using var to declare variable in Javascript?
I hope Stack Overflow users do not close this question too soon or downvote it too much since there is no definite answer. It is a problem that is affecting newbies like me.