Your SlideShare is downloading. ×
0
"JavaScript: The Good Parts" Summary
"JavaScript: The Good Parts" Summary
"JavaScript: The Good Parts" Summary
"JavaScript: The Good Parts" Summary
"JavaScript: The Good Parts" Summary
"JavaScript: The Good Parts" Summary
"JavaScript: The Good Parts" Summary
"JavaScript: The Good Parts" Summary
"JavaScript: The Good Parts" Summary
"JavaScript: The Good Parts" Summary
"JavaScript: The Good Parts" Summary
"JavaScript: The Good Parts" Summary
"JavaScript: The Good Parts" Summary
"JavaScript: The Good Parts" Summary
"JavaScript: The Good Parts" Summary
"JavaScript: The Good Parts" Summary
"JavaScript: The Good Parts" Summary
"JavaScript: The Good Parts" Summary
"JavaScript: The Good Parts" Summary
"JavaScript: The Good Parts" Summary
"JavaScript: The Good Parts" Summary
"JavaScript: The Good Parts" Summary
"JavaScript: The Good Parts" Summary
"JavaScript: The Good Parts" Summary
"JavaScript: The Good Parts" Summary
"JavaScript: The Good Parts" Summary
"JavaScript: The Good Parts" Summary
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

"JavaScript: The Good Parts" Summary

4,378

Published on

A summary of Douglas Crockford's amazing book "JavaScript: The Good Parts". First presented at the Baltimore/DC JavaScript Users Group on 7/7/2009. …

A summary of Douglas Crockford's amazing book "JavaScript: The Good Parts". First presented at the Baltimore/DC JavaScript Users Group on 7/7/2009. http://www.meetup.com/baltimore-dc-javascript-users/calendar/10560330/

Published in: Technology
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
4,378
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
66
Comments
0
Likes
4
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. JavaScript: The Good Parts @jonathanjulian
  • 2. crockford.com
  • 3. First, the Bad Parts
  • 4. globals. optional ; truthy/falsy. scope.
  • 5. Then, the Good Parts!
  • 6. functions as objects. loose typing. dynamic objects. literals.
  • 7. The Bad Parts
  • 8. globals • x = 1; • var y = 1; • x is in the global namespace • YourAppName.x = 1;
  • 9. line termination • semi-colons are INSERTED by the parser • optional semi-colons are not a “language feature” • you are not warned
  • 10. truthy / falsy
  • 11. ==
  • 12. === All of these are false
  • 13. take advantage • if (x) • if (myobject.propery) • if (myobject.property == null) // no, No, NO! • test for exactly what you want to test for • ...or not • KNOW THE FALSY VALUES undefined, null, false, 0, ‘’, NaN
  • 14. no block scope • functions create scope • blocks do not
  • 15. The Good Parts!
  • 16. functions are objects • can be passed, returned • have scope • have closure
  • 17. loose typing • no compiler • no type heirarchies
  • 18. objects are dynamic • members can be added to any object, any time • helpful to attach attributes
  • 19. object literals • aka JSON • { count: 2, prefix: ‘pre_’ } • pass options to functions • JSON as communication • JSON as persistence • etc
  • 20. Know the bad parts are there...and avoid them
  • 21. Learn and love the good parts!
  • 22. tools • FireBug • JSLint • spidermonkey / rhino / v8
  • 23. takeaway • think about vars and scope • never use == • if (myobject) { • jslint.com
  • 24. JavaScript is a beautiful language
  • 25. jonathan.m.julian@gmail.com @jonathanjulian jonathanjulian.com

×