Upload
john-nunemaker
View
841
Download
0
Tags:
Embed Size (px)
Citation preview
OverviewHistory, Features, and Syntax
Monday, August 31, 2009
History
Monday, August 31, 2009
In the beginning, Netscape created JavaScript
Monday, August 31, 2009
And Microsoft saidit was good
Monday, August 31, 2009
Red-Headed Step ChildMonday, August 31, 2009
AJAXMonday, August 31, 2009
Asynchronous JavaScriptAndXML
Monday, August 31, 2009
Monday, August 31, 2009
Frameworks
Monday, August 31, 2009
The browser and beyond...
Monday, August 31, 2009
Features
Monday, August 31, 2009
Dynamic
Monday, August 31, 2009
Object Orientedand
Functional
Monday, August 31, 2009
Prototype Based
Monday, August 31, 2009
JSONportability of data to and
from any programming language
Monday, August 31, 2009
Examples
Monday, August 31, 2009
Monday, August 31, 2009
Monday, August 31, 2009
Syntax
Monday, August 31, 2009
case sensitiveapple != Apple
Monday, August 31, 2009
whitespace and semicolons
var a = 2;var b = 3;
return a + b;
returna + b;
Monday, August 31, 2009
comments// this is a single line comment
/* thisisa multiline comment */
Monday, August 31, 2009
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
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
Debugging
Monday, August 31, 2009
Monday, August 31, 2009
Firebug (Firefox)
http://getfirebug.com/
Monday, August 31, 2009
Web Inspector (Safari)
Monday, August 31, 2009