JavaScript: Hey Y'all Watch This!

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on. →

JavaScript: Hey Y'all Watch This!

Ah, JavaScript! Like it or not, it’s a “tragically important” language that is “eating the world.” Hate it? Love it? Avoid it? Embrace it?

This talk is a parade of face-palm JavaScript fails, history of JavaScript, why it is the way that it is, how it's getting better, and bad jokes sure to get an eye-roll from everyone! Along the way, we may even learn a few mistakes to avoid and tips to make our own JavaScript less terrible!

David Neal

March 07, 2019

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

170 slides
  1. > const lol = a + b + c –

    f * ( n + o ); NaN
  2. ( a + b ) + c !== a +

    ( b + c ) > 0.1 + 0.2 === 0.3 false
  3. > typeof undefined // undefined > typeof true // boolean

    > typeof "hello" // string > typeof 1 // number > typeof {lol:true} // object > typeof [1,2,3] // object > typeof null // object
  4. > null == 0 // false > null > 0

    // false > null < 0 // false > null >= 0 // true > null <= 0 // true > Number( null ) // 0
  5. // undefined function troll() { return { haha: "ha!" };

    } troll(); // automatic semi-colon
  6. const arr = []; arr[1] = 1; arr[3] = 2;

    arr[10] = 3; arr.length // 11 arr[-1] = 4; arr.s = 5; arr.length // 11
  7. const person = { name: "David", speak: function() { console.log(

    `${ this.name } likes bacon.` ); } }; person.speak(); // David likes bacon
  8. const person = { name: "David", speak: function() { console.log(

    `${ this.name } likes bacon.` ); } }; const davidSpeak = person.speak; // true davidSpeak === person.speak; // undefined likes bacon davidSpeak();
  9. this.name = "Mike"; const fatArrowPerson = { name: "Jerry", speak:

    () => { console.log( `${ this.name } likes bacon, too.` ); } }; // Mike likes bacon, too. fatArrowPerson.speak();

More Decks by David Neal

Other Decks in Programming