View Single Post
Old 05-20-2009, 03:45 PM   #16 (permalink)
CrazeD
CrazeD's Avatar
 
Wizard Techie

Join Date: Feb 2006

Location: Maine

Posts: 3,688

CrazeD will become famous soon enough

Send a message via AIM to CrazeD Send a message via MSN to CrazeD
Default Re: the tricky business of programming

Quote:
Originally Posted by kmote View Post
Interestingly enough, according to standards (note that I have not read the standard myself to verify this) javascript does not require semicolons though they are considered good practice. And while you are right to note that javascript is an interpreted language and as such is not compiled, you can usually set the browser to pop up with an error if there is a problem.
You are correct, Javascript does not require semicolons. I believe it treats a new line as an end of the previous statement. However I always use semicolons, just out of habit from other languages.

And you are also right again, Javascript problems can be debugged with the browser. If you are using Firefox I highly recommend the Firebug extension. You can step-by-step crawl Javascript code, insert breaks, and so on to debug and find out where things went wrong.
__________________

Need website help? PM me!
CrazeD is offline   Reply With Quote