Image may be NSFW.
Clik here to view.
Clik here to view.

Debugging JavaScript code has always been an headache for the JavaScript programmers. This is mainly due to improper errors given by the browsers for errors in JavaScript code. You cannot rely on the line no given by the browser for JavaScript code errors but you need to know some techniques on debugging the same.