A

Admin • 833K Points
Coach

Q. Which of the following is a correct way to define an arrow function?

  • (A) const add = (a, b) => a + b;
  • (B) const add = => (a, b) a + b;
  • (C) const add = function => a + b;
  • (D) const add => (a, b) => a + b;
  • Correct Answer - Option(A)
  • Views: 29
  • Filed under category JavaScript
  • Hashtags:

Explanation by: Admin

This is the correct syntax for defining arrow functions.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.