Arrow function expressions - JavaScript | MDN

PHOTO EMBED

Mon Nov 06 2023 04:35:03 GMT+0000 (Coordinated Universal Time)

Saved by @cujaab

const func = (x) => x * x;
// expression body syntax, implied "return"

const func2 = (x, y) => {
  return x + y;
};
// with block body, explicit "return" needed
content_copyCOPY

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions