JScript (Java Script) ======= Statements ---------- // - Single-line comment /* */ - Multi-line comment var a, num = 5, str = "some string"; - "var" defines any variable - numeric, string or general try {// code... } catch(e_var) - e_var recieves the value of the thrown error {// handling... } finally - Unconditionally executed after all other error processing {// cleaning... } throw "my error"; - Throws an error debuger - Suspends execution (like a break point) if (condition) {... } else {... } test ? do_if_true : do_if_false; switch (expression) { case label1: ... case label2: ... default: ... } while (condition) {... } do {... } while (condition); for (i=0; i<10;i++) {... } for (var1 in [object | array]) {... } label_name: - Labeled statement continue [label]; - Stops the current loop iteration and starts a new one continue label_name; - Specifies what label to restart break [label]; - Exits from the current loop and continues execution break label_name; - Specifies what label to break function f(args...) {... return(expression); - Function doesn't have to return a value } new obj_constructor[(args)]; - Creates a new object (my_date = new Date("Mar 10 2005);) this.property; - Refers to the current object with (object) - Specifies the object to use in the following scope (like namespaces in c++) { } Operators --------- . [] () - Field access, array indexing, function calls, and expression grouping ++ -- - ~ ! delete new typeof void - Unary operators, return data type, object creation, undefined values & - Bitwise AND ^ - Bitwise XOR | - Bitwise OR && - Logical AND || - Logical OR ?: - Conditional = OP= - Assignment, assignment with operation , - Multiple evaluation