Javascript is a fun language, but its laissez-faire nature and occasionally weird semantics lend themselves easily to the development of poor practices. Fortunately, there are several linting tools, such as jshint, which analyze code and complain about such things; I&#x27;d suggest taking a look at jshint&#x27;s documentation, which is a veritable catalog of things it&#x27;s easy to get wrong in JS and have come back later to bite you. I&#x27;d suggest even more strongly installing jshint and using it on your code; it&#x27;s easy (just &quot;npm install -g jshint&quot; and you&#x27;re off and running) and highly beneficial.<p>I&#x27;d also suggest that it&#x27;s worth your while to take advantage of the JS dev community&#x27;s excellent culture around automated testing; while that&#x27;s a slightly more complicated topic, it is only slightly so, and I&#x27;ve found that a solid test suite, plus a coverage tool to ensure it doesn&#x27;t leave anything out, is even better for improving and maintaining code quality than just a linter by itself -- jshint can catch stylistic and structural errors, but only unit tests will catch logic errors and regressions introduced by a new change. If you&#x27;re (understandably) bewildered by the variety of testing tools available -- it seems like somebody comes out with a nifty new one every week or so -- then I&#x27;d suggest you can hardly go wrong with these:<p>* jshint, as already described<p>* Mocha, a flexible and reliable test framework<p>* Istanbul, a coverage report generator<p>* Grunt, a build tool whose plugin architecture simplifies integrating them<p>For an example of how they work together, you might take a look at <a href="https:&#x2F;&#x2F;github.com&#x2F;aaron-em&#x2F;same-encoder" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;aaron-em&#x2F;same-encoder</a>, where I use them all in support of a library providing functionality which I think is neat and probably no one else cares about. No doubt there are much better examples, but none come to mind quite so readily, and this codebase being as small as it is, it should be able to serve as a decent overview without being so big you&#x27;ll get bogged down in it. In particular, &#x2F;Gruntfile.js demonstrates how to tie all these disparate tools together for quick invocation with a single command like &#x27;grunt validate&#x27;, which I find makes it a lot more likely I will actually remember to run them; also take a look in &#x2F;test&#x2F;unit for an example of how Mocha tests are actually written.