I wouldn't say that JavaScript is "perfectly good." For instance, the statement "i=0" declares a global named i, unless there's a "var i" statement in a closer scope. It's a very, very easy mistake to make, and can lead to hours of debugging.
JavaScript is good, but CoffeeScript removes many of its imperfections, as well as offering a far better syntax.
jslint will help you to identify the global issue and takes seconds instead of hours.
Any time I have to reach for an external tool to figure out what's wrong with my program, I wonder if the language/framework/library/whatever could be improved to help prevent the problem in the first place. Valgrind much?
I'll never understand why some people are so opposed to learning new languages, especially one which won't change your current ecosystem and greatly improve your life (and quickly).