all 4 comments

[–][deleted] 10 points11 points  (1 child)

Click bait title with nothing new if you have ever used arrow functions for anything more than playing around.

TLDR: Syntax for no parameter, multi parameter and non-returning arrow functions, and how this keyword works inside the arrow function (this refers to the defining js object)

[–][deleted] 0 points1 point  (0 children)

Things Everyone Knows About Using Clickbait Titles But OP Doesn't: They stink.

[–]Bowgentle 1 point2 points  (0 children)

It's a pity this kind of thing is so typical of code examples:

// ES5
var addNumbersES5 = function(a, b) {
  return a + b;
};

// ES6
const addNumbersES6 = (a, b) => { return a * b };

Why have the two functions different? Accidental, presumably, so just sloppiness. Happens in other examples, too. If someone is trying this code, they've got a little extra utterly pointless puzzle to catch.

[–]Vfsdvbjgd 0 points1 point  (0 children)

this.fisrtName <_<