Important Things to Know

JavaScript is Case Sensitive
In HTML, I can use lowercase or uppercase characters because HTML doesn't care. Not so in JavaScript. I have to pay close attention to the capitalization of commands. Placing an uppercase character where a lowercase one should be will cause an error.

Beware of Line Breaks
HTML is very forgiving in terms of line breaks. I can have as many as I want, HTML doesn't care, it just ignores the line breaks. With JavaScript, it makes a big difference where a line breaks. Commands should always be on one line, regardless of how long it is (it's okay if it jumps on its own to the next line, but don't press the return button!) If I break the line, the script may not work.

Watch the Spaces
As with the line breaks, HTML ignores extra spaces. JavaScript does not! If it sees an extra space, it will be confused and not work with such an error.

Don't Set Margins
Margins cannot get in the way. Work in a text editor that has no margins at all. By no margins, this means I can write off into the right side of the text screen for miles! Doing it any other way could cause problems in my scripts.
Table of Contents Next