Javascript1

Session 1

 * Firebug Console/Interpreter

An expression (EXPR) can be:
 * Expressions
 * a primitive (e.g. 1)
 * a variable (e.g. x)
 * an operator combining smaller EXPR's (e.g. x+1, 2*(x+1))


 * Operators have:
 * keyword or symbol (OP)
 * syntax template (e.g. _ OP _)
 * prefix: OP_
 * postfix: _OP
 * infix: _OP_
 * compound: _OP_OP_
 * one or more inputs _ ("operands")
 * one output ("return value")
 * may be undefined
 * possible side-effects (e.g. change in variable's value)


 * Variables have:
 * a name/identifier
 * a value (initially undefined)
 * each value has a type (primitive or reference)
 * a scope


 * Other (non-expression) Statements
 * var NAME;
 * var NAME = EXPR;
 * if (EXPR) {EXPR;}
 * if (EXPR) {EXPR;} else {EXPR;}


 * Primitive Types
 * undefined
 * Number
 * same type for integers and floats (fractional)
 * special values: NaN ("not a number"), Infinity
 * String
 * wrapped in either " " or ' '
 * may contain opposite quote or other special characters
 * \t (tab)
 * \n (newline)
 * Boolean (true/false)
 * false-ish values: false,undefined,null,0,"",NaN
 * (some) true-ish values: true,1,"false","undefined","0",{} (empty object)

Some Sample Operators: