JavaScript: The Good Parts

345 views

Published on

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

  • Be the first to like this

No Downloads
Views
Total views
345
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

JavaScript: The Good Parts

  1. 1. JavaScriptThe Good Parts
  2. 2. The Awfulno linker = global vars are requiredand global vars are very, very badthere is block syntax, but not block scopesemi-colon insertionmost reserved words are not used
  3. 3. The Awful16-bit stringstypeofparseInt+binary floating point
  4. 4. The AwfulNaNPhony ArraysFalsy ValueshasOwnPropertyObject
  5. 5. The Bad== and !=withevalFunctionsetTimeout and setInterval (string arg version)
  6. 6. The Badcontinueswitch fall throughsblockless statements++ and --bitwise operators
  7. 7. The Badfunction: declaration vs. expressiontyped wrappersnewvoid/* block comments */
  8. 8. The Goodfunctionsloose typingdynamic objectsliteralsnumber
  9. 9. The Goodfunction objectnessfunction invocation patterns method, function, constructor, applyfunction argumentsfunction return
  10. 10. The Goodscopeclosurecallbacksmodulecascade
  11. 11. The Goodcurrymemoization (cache)inheritance pseudoclassical object specifiers prototypal functional parts

×