+ 3
Use chrome dev tools, here's how.
https://developers.google.com/web/tools/chrome-devtools/javascript/
+ 1
Not algorithm but process of debugging, most valuable tool for newbie programmers
+ 1
There are kinds of bugs, the most obvious is syntax errors which are identified by the compiler or interpreter. The other are logic or algorithmic bugs. Familiarity of control and data structures will help