Comments about Eloquent JavaScript: chapters 2 and 3

889 views

Published on

Comments about Eloquent JavaScript: chapters 2 and 3

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
889
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Comments about Eloquent JavaScript: chapters 2 and 3

    1. 1. Javascript Tricky stuffEloquent JavaScript - Chapters 2 and 3
    2. 2. Variables comparison• null == undefined• false == 0• “” == 0• “5” == 5• Use === or !==
    3. 3. Boolean expressions• 0, “”, null, undefined, NaN equiv. to false• anything else equiv. to true
    4. 4. Automatic type conversion• “patata”+5• null + “torious”• “4” * 4 --> Number(“4”) * 4• 4 * “patata”• typeof NaN ?• https://www.destroyallsoftware.com/talks/ wat
    5. 5. NaN• NaN == NaN ?• isNaN• isNaN(“3”) ?
    6. 6. && ||• var output = (input || “is input is false”)• var output = (input && “input is true”)• Evaluates the first part of the expression, the second part only if necessary
    7. 7. Scope of variables• Global• Local• var name OR name• Closure•
    8. 8. Efficiency• Recursion vs loops
    9. 9. Functions• Anonymous• Arguments variable

    ×