28
Overview History, Features, and Syntax Monday, August 31, 2009

History, Features and Syntax

Embed Size (px)

Citation preview

Page 1: History, Features and Syntax

OverviewHistory, Features, and Syntax

Monday, August 31, 2009

Page 2: History, Features and Syntax

History

Monday, August 31, 2009

Page 3: History, Features and Syntax

In the beginning, Netscape created JavaScript

Monday, August 31, 2009

Page 4: History, Features and Syntax

And Microsoft saidit was good

Monday, August 31, 2009

Page 5: History, Features and Syntax

Red-Headed Step ChildMonday, August 31, 2009

Page 6: History, Features and Syntax

AJAXMonday, August 31, 2009

Page 7: History, Features and Syntax

Asynchronous JavaScriptAndXML

Monday, August 31, 2009

Page 8: History, Features and Syntax

Monday, August 31, 2009

Page 9: History, Features and Syntax

Frameworks

Monday, August 31, 2009

Page 10: History, Features and Syntax

The browser and beyond...

Monday, August 31, 2009

Page 11: History, Features and Syntax

Features

Monday, August 31, 2009

Page 12: History, Features and Syntax

Dynamic

Monday, August 31, 2009

Page 13: History, Features and Syntax

Object Orientedand

Functional

Monday, August 31, 2009

Page 14: History, Features and Syntax

Prototype Based

Monday, August 31, 2009

Page 15: History, Features and Syntax

JSONportability of data to and

from any programming language

Monday, August 31, 2009

Page 16: History, Features and Syntax

Examples

Monday, August 31, 2009

Page 17: History, Features and Syntax

Monday, August 31, 2009

Page 18: History, Features and Syntax

Monday, August 31, 2009

Page 19: History, Features and Syntax

Syntax

Monday, August 31, 2009

Page 20: History, Features and Syntax

case sensitiveapple != Apple

Monday, August 31, 2009

Page 21: History, Features and Syntax

whitespace and semicolons

var a = 2;var b = 3;

return a + b;

returna + b;

Monday, August 31, 2009

Page 22: History, Features and Syntax

comments// this is a single line comment

/* thisisa multiline comment */

Monday, August 31, 2009

Page 23: History, Features and Syntax

reserved wordsbreak 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

Page 24: History, Features and Syntax

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

Page 25: History, Features and Syntax

Debugging

Monday, August 31, 2009

Page 26: History, Features and Syntax

Monday, August 31, 2009

Page 27: History, Features and Syntax

Firebug (Firefox)

http://getfirebug.com/

Monday, August 31, 2009

Page 28: History, Features and Syntax

Web Inspector (Safari)

Monday, August 31, 2009