Recursively creating communities of developers; learn, create, teach, repeat.
One tip about arrow function, if use this without { ... }, the value of expression is automatic returned without need return statement, with { ... } around expression is necessary explicit return. Example:
{ ... }
return
const add1 = (a, b) => a + b; console.log(add1(10, 5)); // print 15 const add2 = (a, b) => { return a + b; }; console.log(add2(10, 5)); // print 15 const add3 = (a, b) => { a + b; }; console.log(add3(10, 5)); // print undefined
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
One tip about arrow function, if use this without
{ ... }
, the value of expression is automatic returned without needreturn
statement, with{ ... }
around expression is necessary explicitreturn
. Example: