Asv3's Blog

September 20, 2009

JavaScript Syntax

Filed under: Uncategorized — Tags: , , — asv3 @ 10:29 pm

Identifiers in JavaScript should start from a letter/underscore or a dollar sign, all other characters might be letters, underscores, dollar signs, or numbers.

You cannot use a key word as an identifier.

In JavaScript every thing is case sensitive. something differs from someThing.

you can single line and multi line comments similar to C language.

//single line comment

/*
* This is a multi-line
* Comment
*/

/*

* This is a multi-line

* Comment

*/

A semicolon at end of each statement is preferred but not mandatory.

Create a free website or blog at WordPress.com.