Monday, January 12, 2009

How to check your JavaScript code for errors

There are times when you can't understand why your code is not doing what it's supposed to do. After killing half an hour on trying to figure out what is the problem you either give up and decide to rewrite or leave it for later. Later looking at your code you clearly see the bug and think how you couldn't you see it.

For cases like that you can use online JavaScript code validator JSLint.

2 comments:

  1. Getting error Typeerror: Components.classes[cid_siterank] is undefined
    Does anyone know what is wrong. Firefox has started to crash too

    ReplyDelete
  2. Thankyou, this really helped me out. I forgot to name my variable. (silly me :) )

    ReplyDelete