Statements may contain a semicolon at the end of them as in C, but it is not necessary unless there are multiple statements on one line. Multiple statements on one line must be separated by a semicolon.
Quotes may be single quote (') or double quote ("). When embedded within each other they must be used consistently as in the following example.
onMouseOver="window.status='To Operating Systems Section' ;return true"
Comments are the same as in C++ with the "//" characters for a single line comment, and the "/*" for the beginning of a multiline comment and the "*/" for the end of a multiline comment.
Variables must be defined before they are used.
Built-in objects such as Math and Date are capitalized.
DOM object names are usually lowercase, but their methods are often a combination of capitals and lowercase. Usually capitals are used for all but the first word, as in toLowerCase and getElementById.
Variable, Object, and Function Names
When you define your own variables, objects, or functions, you can choose their names. Names can include uppercase letters, lowercase letters, numbers, and the underscore (_) character. Names must begin with a letter or underscore.