Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Javascript: You Like It, It Likes You

Scott Kosman
September 27, 2011

Javascript: You Like It, It Likes You

The slide deck from a "Javascript For Beginners" training session I ran in our office earlier this year. Of course, some of the slides won't make sense out of context, but whatevs, right?

Also, be warned that I was pretty sleep-deprived when this all happened, and a side effect of that was that I swore a LOT during the presentation. Some of that leaked it's way into the slide deck. Maybe don't show this to your mom.

Scott Kosman

September 27, 2011
Tweet

More Decks by Scott Kosman

Other Decks in Programming

Transcript

  1. Douglas Crockford Every time you forget a semicolon, he roundhouse

    kicks your mom in the face. Tuesday, 27 September, 11
  2. Some JavaScript fundamentals. Comments. Comment your code so the next

    slackjawed gutbucket who’s clearly way dumber than you that has to work with it isn’t TOTALLY boned, plzkthx. Tuesday, 27 September, 11
  3. x = 4; y = “7”; x.toString(); // “4” (string)

    parseInt(y,10); // 7 (number) Variable comparisons. Tuesday, 27 September, 11
  4. y = “why”; parseInt(y,10); // NaN (Not a Number) Variable

    comparisons. Tuesday, 27 September, 11
  5. NaN == NaN; NaN === NaN; // both false. Variable

    comparisons. This is why Douglas Crockford drinks. Tuesday, 27 September, 11
  6. Note that +, besides being used for math, also concatenates

    strings. ! ! ! ! ! var x = 5 + 3; !! ! ! // 8 - Number ! ! ! ! ! var x = “5” + “3”; !! // “53” - String (PHP got this part right. JavaScript? Meh.) Variable comparisons. This is why Scott Kosman drinks. Tuesday, 27 September, 11
  7. Variables and data types. Something about Madonna. (Array of light?

    See what I did there?) Tuesday, 27 September, 11
  8. Helpful resources. well it's on and on and on on

    and on the beat don't stop until the break of dawn Douglas Crockford on Javascript in Six Parts http://developer.yahoo.com/yui/theater/video.php?v=crockonjs-1 Firebug http://www.getfirebug.com JSLint http://www.jslint.com Tuesday, 27 September, 11