1. 6
  1.  

  2. 7

    Really weird article. Nearly all cases where you supposedly can’t use an arrow function can be slightly rewritten to use one.

    The first example can be rewritten to use the event argument:

    button.addEventListener('click', (evt) => {
        evt.target.classList.toggle('on');
    });
    

    The second one could just use the object variable directly:

    const person = {
        points: 23,
        score: () => {
            person.points++;
        }
    }
    

    The forth one complains about the missing arguments magic variable. This has just been replaced by the more sensible ...rest.

    The third example uses prototype based ‘mixins’ and that seems like the only valid example for me, although I don’t think that using prototypes adds much to the language and you are nearly always better of with a functional approach.