"Things You Can Do In ES6 That Can't Be Done In ES5" - View Source talk by Dan Shappir

Поделиться
HTML-код
  • Опубликовано: 23 окт 2024

Комментарии • 3

  • @linz4213
    @linz4213 8 лет назад +3

    Great talk, straight to all the import point of ES6

  • @Srikanthking1
    @Srikanthking1 7 лет назад

    What is the bug in es5 given at 3: 12?. Couldn't figure out any help?.

    • @vsemozhetbyt
      @vsemozhetbyt 7 лет назад +1

      `console.log(es5({bar: 0}));` outputs 42. To fix it, the line `var bar = param.bar || 42;` should be `var bar = param.bar !== undefined ? param.bar : 42;`.