Upgrade to Pro — share decks privately, control downloads, hide ads and more …

History, Features and Syntax

History, Features and Syntax

John Nunemaker

August 31, 2009
Tweet

More Decks by John Nunemaker

Other Decks in Programming

Transcript

  1. whitespace and semicolons var a = 2; var b =

    3; return a + b; return a + b; Monday, August 31, 2009
  2. comments // this is a single line comment /* this

    is a multiline comment */ Monday, August 31, 2009
  3. reserved words break else new var case finally return void

    catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public Monday, August 31, 2009
  4. Data Types • numbers: 1 2 3 4 etc. •

    strings: “some word” ‘also a string’ • booleans: true false • null and undefined • dates: new Date() • functions: function () { ... } • objects: {foo: ‘bar’}; a.foo // ‘bar’ Monday, August 31, 2009