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;
πŸ’¬ Discuss
βœ… Correct Answer: (A) const add = (a, b) => a + b;
Explanation: This is the correct syntax for defining arrow functions.
Explanation by: Mr. Dubey
This is the correct syntax for defining arrow functions.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
121
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
91%
Success Rate