Javascript by Yahoo

B
The JavaScript Programming Language Douglas Crockford
Overview ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The World's Most Misunderstood Programming Language
Sources of Misunderstanding ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
History ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Not a Web Toy ,[object Object],[object Object],[object Object]
Key Ideas ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Values ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Numbers ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
NaN ,[object Object],[object Object],[object Object],[object Object]
Number function ,[object Object],[object Object],[object Object],[object Object]
parseInt function ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Math ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Strings ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
String  length ,[object Object],[object Object]
String function ,[object Object],[object Object]
String Methods ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Booleans ,[object Object],[object Object]
Boolean function ,[object Object],[object Object],[object Object],[object Object]
null ,[object Object]
undefined ,[object Object],[object Object],[object Object]
Falsy values ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Everything Else Is Objects
Dynamic Objects ,[object Object],[object Object],[object Object],[object Object],[object Object]
Loosely Typed ,[object Object],[object Object]
C ,[object Object],[object Object]
Identifiers ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Reserved Words ,[object Object]
Comments ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Operators ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
+ ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
+ ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
/ ,[object Object],[object Object]
==  != ,[object Object],[object Object],[object Object]
&& ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
|| ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
! ,[object Object],[object Object],[object Object]
Bitwise ,[object Object],[object Object]
Statements ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Break statement ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
For statement ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
For statement ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Switch statement ,[object Object],[object Object],[object Object]
Switch statement ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Throw statement ,[object Object],[object Object],[object Object],[object Object],[object Object]
Try statement ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Try Statement ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
With statement ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Function statement ,[object Object],[object Object],[object Object]
Var statement ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Scope ,[object Object],[object Object],[object Object]
Return statement ,[object Object],[object Object],[object Object],[object Object],[object Object]
Objects ,[object Object],[object Object],[object Object]
Collections ,[object Object],[object Object],[object Object],[object Object],[object Object]
Object Literals ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Object Literals var myObject = {name: "Jack B. Nimble", 'goto': 'Jail', grade: 'A', level: 3};  var theName = myObject.name; var destination = myObject['goto']; 3 "level" "A" "grade" "Jail" "goto" "Jack B. Nimble" "name"
Maker Function ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Object Literals var myObject = {name: "Jack B. Nimble", 'goto': 'Jail', grade: 'A',  format: {type: 'rect', width: 1920, height: 1080, interlace: false, framerate: 24} };
Object Literals var myObject = { name: "Jack B. Nimble",  'goto': 'Jail',  grade: 'A',  format: { type: 'rect',  width: 1920,  height: 1080,  interlace: false,  framerate: 24 } };
Object Literals myFunction({ type: 'rect',  width: 1920,  height: 1080 }); throw { name: 'error',  message: 'out of bounds' };
Object Literals ,[object Object],[object Object]
Object Augmentation ,[object Object],[object Object],[object Object],[object Object],[object Object]
Linkage ,[object Object],[object Object],[object Object],[object Object]
Linkage var myNewObject = object(myOldObject); myNewObject myOldObject 3 "level" "A" "grade" "Jail" "goto" "Jack B. Nimble" "name"
Linkage myNewObject.name = "Tom Piperson"; myNewObject.level += 1; myNewObject.crime = 'pignapping'; "pignapping" "crime" 4 "level" "Tom Piperson" "name" 3 "level" "A" "grade" "Jail" "goto" "Jack B. Nimble" "name"
Inheritance ,[object Object],[object Object]
Prototypal Inheritance ,[object Object],[object Object],[object Object],[object Object],[object Object]
Prototypal Inheritance ,[object Object],[object Object],[object Object],[object Object]
Object Methods ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Object Construction ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Reference ,[object Object],[object Object],[object Object],[object Object],[object Object]
Delete ,[object Object],[object Object]
Arrays ,[object Object],[object Object],[object Object],[object Object],[object Object]
length ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Array Literals ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Array Methods ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Deleting Elements ,[object Object],[object Object],[object Object],[object Object]
Deleting Elements ,[object Object],[object Object],[object Object],[object Object],[object Object]
Arrays v Objects ,[object Object],[object Object],[object Object]
Distinguishing Arrays ,[object Object],[object Object],[object Object]
Arrays and Inheritance ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Functions ,[object Object],[object Object],[object Object]
Function operator ,[object Object],[object Object],[object Object],[object Object],[object Object]
lambda ,[object Object],[object Object],[object Object]
Function statement ,[object Object],[object Object],[object Object],[object Object]
Inner functions ,[object Object],[object Object]
Scope ,[object Object],[object Object]
Closure ,[object Object],[object Object]
Example ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Function Objects ,[object Object],[object Object]
Method ,[object Object],[object Object]
Invocation ,[object Object],[object Object],[object Object]
Invocation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Method form ,[object Object],[object Object],[object Object]
Function form ,[object Object],[object Object],[object Object],[object Object],[object Object]
Constructor form ,[object Object],[object Object],[object Object]
this ,[object Object],[object Object],[object Object],the new object constructor the object method the global object function this Invocation form
arguments ,[object Object],[object Object],[object Object],[object Object]
Example ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Augmenting Built-in Types ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
trim String.prototype.trim = function () { return this.replace( /^*(*(++)*)*$/, "$1");  };
supplant ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
supplant ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
typeof ,[object Object],'undefined' undefined 'object' null 'boolean' boolean 'string' string 'number' number 'object' array 'function' function 'object' object typeof type
eval ,[object Object],[object Object],[object Object],[object Object]
Function function ,[object Object],[object Object],[object Object],[object Object]
Built-in Type Wrappers ,[object Object],[object Object],[object Object],[object Object],[object Object]
Confession ,[object Object],[object Object],[object Object],[object Object],[object Object]
Augmentation ,[object Object],[object Object],[object Object]
Working with the Grain ,[object Object],[object Object]
(global) Object ,[object Object],[object Object],[object Object],[object Object],[object Object]
Global variables are evil ,[object Object],[object Object],[object Object]
Implied Global ,[object Object],[object Object],[object Object],[object Object]
Namespace ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Encapsulate ,[object Object],[object Object]
Example YAHOO.Trivia = function () { // define your common vars here // define your common functions here return { getNextPoser: function (cat, diff) { ... }, showPoser: function () { ... } }; } ();
Thinking about type ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Date ,[object Object],[object Object]
RegExp ,[object Object],[object Object],[object Object],[object Object],[object Object]
Threads ,[object Object],[object Object],[object Object],[object Object]
Platforms ,[object Object],[object Object],[object Object],[object Object],[object Object]
ActionScript ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
E4X ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
ECMAScript Fourth Edition ,[object Object],[object Object],[object Object],[object Object]
Style ,[object Object],[object Object],[object Object],[object Object],[object Object]
Style and JavaScript ,[object Object],[object Object],[object Object]
Code Conventions for the JavaScript Programming Language http://javascript.crockford.com/code.html
Semicolon insertion ,[object Object],[object Object],[object Object],[object Object]
Line Ending ,[object Object],[object Object],[object Object]
Comma ,[object Object],[object Object],[object Object],[object Object]
Required Blocks ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Forbidden Blocks ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Variables ,[object Object],[object Object]
Expression Statements ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
switch  Statement ,[object Object],[object Object]
Assignment Expressions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
== and != ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Labels ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
JSLint ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
UHOH! ,[object Object],[object Object],[object Object],[object Object]
Key Ideas ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The JavaScript Programming Language Douglas Crockford [email_address] produce.yahoo.com/crock/javascript.ppt
1 de 142

Recomendados

CProgrammingTutorial por
CProgrammingTutorialCProgrammingTutorial
CProgrammingTutorialMuthuselvam RS
4K vistas130 diapositivas
Introduction of c_language por
Introduction of c_languageIntroduction of c_language
Introduction of c_languageSINGH PROJECTS
993 vistas13 diapositivas
Learning c - An extensive guide to learn the C Language por
Learning c - An extensive guide to learn the C LanguageLearning c - An extensive guide to learn the C Language
Learning c - An extensive guide to learn the C LanguageAbhishek Dwivedi
14K vistas142 diapositivas
C presentation book por
C presentation bookC presentation book
C presentation bookkrunal1210
5.2K vistas260 diapositivas
Chapter1 c programming data types, variables and constants por
Chapter1 c programming   data types, variables and constantsChapter1 c programming   data types, variables and constants
Chapter1 c programming data types, variables and constantsvinay arora
6.8K vistas34 diapositivas
Introduction of c programming unit-ii ppt por
Introduction of  c programming unit-ii pptIntroduction of  c programming unit-ii ppt
Introduction of c programming unit-ii pptJStalinAsstProfessor
196 vistas30 diapositivas

Más contenido relacionado

La actualidad más candente

Basic C Programming language por
Basic C Programming languageBasic C Programming language
Basic C Programming languageAbhishek Soni
1.5K vistas30 diapositivas
C the basic concepts por
C the basic conceptsC the basic concepts
C the basic conceptsAbhinav Vatsa
58.2K vistas58 diapositivas
Structure of c_program_to_input_output por
Structure of c_program_to_input_outputStructure of c_program_to_input_output
Structure of c_program_to_input_outputAnil Dutt
1.3K vistas74 diapositivas
C material por
C materialC material
C materialtarique472
5.8K vistas70 diapositivas
Programming in C- Introduction por
Programming in C- IntroductionProgramming in C- Introduction
Programming in C- Introductionsavitamhaske
1.8K vistas23 diapositivas
C programming por
C programmingC programming
C programmingsaniabhalla
9.7K vistas152 diapositivas

La actualidad más candente(20)

Basic C Programming language por Abhishek Soni
Basic C Programming languageBasic C Programming language
Basic C Programming language
Abhishek Soni1.5K vistas
C the basic concepts por Abhinav Vatsa
C the basic conceptsC the basic concepts
C the basic concepts
Abhinav Vatsa58.2K vistas
Structure of c_program_to_input_output por Anil Dutt
Structure of c_program_to_input_outputStructure of c_program_to_input_output
Structure of c_program_to_input_output
Anil Dutt1.3K vistas
C material por tarique472
C materialC material
C material
tarique4725.8K vistas
Programming in C- Introduction por savitamhaske
Programming in C- IntroductionProgramming in C- Introduction
Programming in C- Introduction
savitamhaske1.8K vistas
C programming por saniabhalla
C programmingC programming
C programming
saniabhalla9.7K vistas
C tokens por Manu1325
C tokensC tokens
C tokens
Manu132521.1K vistas
C programming tutorial for Beginner por sophoeutsen2
C programming tutorial for BeginnerC programming tutorial for Beginner
C programming tutorial for Beginner
sophoeutsen2144 vistas
Variables in C and C++ Language por Way2itech
Variables in C and C++ LanguageVariables in C and C++ Language
Variables in C and C++ Language
Way2itech5.1K vistas
C programming Training in Ambala ! Batra Computer Centre por jatin batra
C programming Training in Ambala ! Batra Computer CentreC programming Training in Ambala ! Batra Computer Centre
C programming Training in Ambala ! Batra Computer Centre
jatin batra259 vistas
C notes.pdf por Durga Padma
C notes.pdfC notes.pdf
C notes.pdf
Durga Padma41.5K vistas
Complete Tokens in c/c++ por Shobi P P
Complete Tokens in c/c++Complete Tokens in c/c++
Complete Tokens in c/c++
Shobi P P455 vistas
Introduction to C Programming por Aniket Patne
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
Aniket Patne1.4K vistas
Basic of the C language por Sachin Verma
Basic of the C languageBasic of the C language
Basic of the C language
Sachin Verma1.2K vistas

Similar a Javascript by Yahoo

P H P Part I, By Kian por
P H P  Part  I,  By  KianP H P  Part  I,  By  Kian
P H P Part I, By Kianphelios
2.8K vistas60 diapositivas
Ruby For Java Programmers por
Ruby For Java ProgrammersRuby For Java Programmers
Ruby For Java ProgrammersMike Bowler
7.6K vistas104 diapositivas
Java script final presentation por
Java script final presentationJava script final presentation
Java script final presentationAdhoura Academy
3.8K vistas51 diapositivas
Javascript por
JavascriptJavascript
Javascriptvikram singh
970 vistas142 diapositivas
Java căn bản - Chapter9 por
Java căn bản - Chapter9Java căn bản - Chapter9
Java căn bản - Chapter9Vince Vo
554 vistas40 diapositivas
Java: Primitive Data Types por
Java: Primitive Data TypesJava: Primitive Data Types
Java: Primitive Data TypesTareq Hasan
3.8K vistas114 diapositivas

Similar a Javascript by Yahoo(20)

P H P Part I, By Kian por phelios
P H P  Part  I,  By  KianP H P  Part  I,  By  Kian
P H P Part I, By Kian
phelios2.8K vistas
Ruby For Java Programmers por Mike Bowler
Ruby For Java ProgrammersRuby For Java Programmers
Ruby For Java Programmers
Mike Bowler7.6K vistas
Java script final presentation por Adhoura Academy
Java script final presentationJava script final presentation
Java script final presentation
Adhoura Academy3.8K vistas
Java căn bản - Chapter9 por Vince Vo
Java căn bản - Chapter9Java căn bản - Chapter9
Java căn bản - Chapter9
Vince Vo554 vistas
Java: Primitive Data Types por Tareq Hasan
Java: Primitive Data TypesJava: Primitive Data Types
Java: Primitive Data Types
Tareq Hasan3.8K vistas
Scala Language Intro - Inspired by the Love Game por Antony Stubbs
Scala Language Intro - Inspired by the Love GameScala Language Intro - Inspired by the Love Game
Scala Language Intro - Inspired by the Love Game
Antony Stubbs1.1K vistas
PHP Powerpoint -- Teach PHP with this por Ian Macali
PHP Powerpoint -- Teach PHP with thisPHP Powerpoint -- Teach PHP with this
PHP Powerpoint -- Teach PHP with this
Ian Macali54K vistas
Majlis Persaraan Pn.Hjh.Normah bersama guru-guru Sesi Petang por Imsamad
Majlis Persaraan Pn.Hjh.Normah bersama guru-guru Sesi PetangMajlis Persaraan Pn.Hjh.Normah bersama guru-guru Sesi Petang
Majlis Persaraan Pn.Hjh.Normah bersama guru-guru Sesi Petang
Imsamad7.4K vistas
Jerry Shea Resume And Addendum 5 2 09 por gshea11
Jerry  Shea Resume And Addendum 5 2 09Jerry  Shea Resume And Addendum 5 2 09
Jerry Shea Resume And Addendum 5 2 09
gshea114.8K vistas
Agapornis Mansos - www.criadourosudica.blogspot.com por Antonio Silva
Agapornis Mansos - www.criadourosudica.blogspot.comAgapornis Mansos - www.criadourosudica.blogspot.com
Agapornis Mansos - www.criadourosudica.blogspot.com
Antonio Silva3.3K vistas
Perl Introduction por Marcos Rebelo
Perl IntroductionPerl Introduction
Perl Introduction
Marcos Rebelo19.6K vistas

Último

terms_2.pdf por
terms_2.pdfterms_2.pdf
terms_2.pdfJAWADIQBAL40
18 vistas8 diapositivas
Leading in A Culture por
Leading in A CultureLeading in A Culture
Leading in A CultureSeta Wicaksana
16 vistas34 diapositivas
NYKAA PPT .pptx por
NYKAA PPT .pptxNYKAA PPT .pptx
NYKAA PPT .pptx125071081
16 vistas9 diapositivas
The 10 Most Iconic Leaders in Supply Chain 2023_compressed.pdf por
The 10 Most Iconic Leaders in Supply Chain 2023_compressed.pdfThe 10 Most Iconic Leaders in Supply Chain 2023_compressed.pdf
The 10 Most Iconic Leaders in Supply Chain 2023_compressed.pdfciolook1
9 vistas32 diapositivas
Business Process Reengineering (BPR) por
Business Process Reengineering (BPR)Business Process Reengineering (BPR)
Business Process Reengineering (BPR)Operational Excellence Consulting (Singapore)
23 vistas30 diapositivas
Coomes Consulting Business Profile por
Coomes Consulting Business ProfileCoomes Consulting Business Profile
Coomes Consulting Business ProfileChris Coomes
50 vistas10 diapositivas

Último(20)

NYKAA PPT .pptx por 125071081
NYKAA PPT .pptxNYKAA PPT .pptx
NYKAA PPT .pptx
12507108116 vistas
The 10 Most Iconic Leaders in Supply Chain 2023_compressed.pdf por ciolook1
The 10 Most Iconic Leaders in Supply Chain 2023_compressed.pdfThe 10 Most Iconic Leaders in Supply Chain 2023_compressed.pdf
The 10 Most Iconic Leaders in Supply Chain 2023_compressed.pdf
ciolook19 vistas
Coomes Consulting Business Profile por Chris Coomes
Coomes Consulting Business ProfileCoomes Consulting Business Profile
Coomes Consulting Business Profile
Chris Coomes50 vistas
Nevigating Sucess.pdf por TEWMAGAZINE
Nevigating Sucess.pdfNevigating Sucess.pdf
Nevigating Sucess.pdf
TEWMAGAZINE24 vistas
Monthly Social Media Update November 2023 copy.pptx por Andy Lambert
Monthly Social Media Update November 2023 copy.pptxMonthly Social Media Update November 2023 copy.pptx
Monthly Social Media Update November 2023 copy.pptx
Andy Lambert19 vistas
bookmyshow-1.pptx por 125071035
bookmyshow-1.pptxbookmyshow-1.pptx
bookmyshow-1.pptx
12507103513 vistas
NewBase 02 December 2023 Energy News issue - 1678 by Khaled Al Awadi.pdf por Khaled Al Awadi
NewBase  02 December 2023  Energy News issue - 1678 by Khaled Al Awadi.pdfNewBase  02 December 2023  Energy News issue - 1678 by Khaled Al Awadi.pdf
NewBase 02 December 2023 Energy News issue - 1678 by Khaled Al Awadi.pdf
Khaled Al Awadi10 vistas
The Talent Management Navigator Performance Management por Seta Wicaksana
The Talent Management Navigator Performance ManagementThe Talent Management Navigator Performance Management
The Talent Management Navigator Performance Management
Seta Wicaksana26 vistas
Super Solar Mounting Solutions 20230509(1).pdf por carrie55bradshaw
Super Solar Mounting Solutions 20230509(1).pdfSuper Solar Mounting Solutions 20230509(1).pdf
Super Solar Mounting Solutions 20230509(1).pdf
carrie55bradshaw10 vistas
Top 10 Web Development Companies in California por TopCSSGallery
Top 10 Web Development Companies in CaliforniaTop 10 Web Development Companies in California
Top 10 Web Development Companies in California
TopCSSGallery73 vistas
Why are KPIs(key performance indicators) important? por Epixel MLM Software
Why are KPIs(key performance indicators) important? Why are KPIs(key performance indicators) important?
Why are KPIs(key performance indicators) important?
Discover the Finest Interior Painting Services in Miami Elevate Your Space wi... por Florida Painting Miami
Discover the Finest Interior Painting Services in Miami Elevate Your Space wi...Discover the Finest Interior Painting Services in Miami Elevate Your Space wi...
Discover the Finest Interior Painting Services in Miami Elevate Your Space wi...
Bloomerang_Forecasting Your Fundraising Revenue 2024.pptx.pdf por Bloomerang
Bloomerang_Forecasting Your Fundraising Revenue 2024.pptx.pdfBloomerang_Forecasting Your Fundraising Revenue 2024.pptx.pdf
Bloomerang_Forecasting Your Fundraising Revenue 2024.pptx.pdf
Bloomerang134 vistas

Javascript by Yahoo

  • 1. The JavaScript Programming Language Douglas Crockford
  • 2.
  • 3. The World's Most Misunderstood Programming Language
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.
  • 53.
  • 54.
  • 55.
  • 56. Object Literals var myObject = {name: "Jack B. Nimble", 'goto': 'Jail', grade: 'A', level: 3}; var theName = myObject.name; var destination = myObject['goto']; 3 "level" "A" "grade" "Jail" "goto" "Jack B. Nimble" "name"
  • 57.
  • 58. Object Literals var myObject = {name: "Jack B. Nimble", 'goto': 'Jail', grade: 'A', format: {type: 'rect', width: 1920, height: 1080, interlace: false, framerate: 24} };
  • 59. Object Literals var myObject = { name: "Jack B. Nimble", 'goto': 'Jail', grade: 'A', format: { type: 'rect', width: 1920, height: 1080, interlace: false, framerate: 24 } };
  • 60. Object Literals myFunction({ type: 'rect', width: 1920, height: 1080 }); throw { name: 'error', message: 'out of bounds' };
  • 61.
  • 62.
  • 63.
  • 64. Linkage var myNewObject = object(myOldObject); myNewObject myOldObject 3 "level" "A" "grade" "Jail" "goto" "Jack B. Nimble" "name"
  • 65. Linkage myNewObject.name = "Tom Piperson"; myNewObject.level += 1; myNewObject.crime = 'pignapping'; "pignapping" "crime" 4 "level" "Tom Piperson" "name" 3 "level" "A" "grade" "Jail" "goto" "Jack B. Nimble" "name"
  • 66.
  • 67.
  • 68.
  • 69.
  • 70.
  • 71.
  • 72.
  • 73.
  • 74.
  • 75.
  • 76.
  • 77.
  • 78.
  • 79.
  • 80.
  • 81.
  • 82.
  • 83.
  • 84.
  • 85.
  • 86.
  • 87.
  • 88.
  • 89.
  • 90.
  • 91.
  • 92.
  • 93.
  • 94.
  • 95.
  • 96.
  • 97.
  • 98.
  • 99.
  • 100.
  • 101. trim String.prototype.trim = function () { return this.replace( /^*(*(++)*)*$/, "$1"); };
  • 102.
  • 103.
  • 104.
  • 105.
  • 106.
  • 107.
  • 108.
  • 109.
  • 110.
  • 111.
  • 112.
  • 113.
  • 114.
  • 115.
  • 116. Example YAHOO.Trivia = function () { // define your common vars here // define your common functions here return { getNextPoser: function (cat, diff) { ... }, showPoser: function () { ... } }; } ();
  • 117.
  • 118.
  • 119.
  • 120.
  • 121.
  • 122.
  • 123.
  • 124.
  • 125.
  • 126.
  • 127. Code Conventions for the JavaScript Programming Language http://javascript.crockford.com/code.html
  • 128.
  • 129.
  • 130.
  • 131.
  • 132.
  • 133.
  • 134.
  • 135.
  • 136.
  • 137.
  • 138.
  • 139.
  • 140.
  • 141.
  • 142. The JavaScript Programming Language Douglas Crockford [email_address] produce.yahoo.com/crock/javascript.ppt