Question 13
Which of the following is a valid function definition to return the sum of 2 numbers passed as parameter?
let add = (x, y) => x + y
let add = (x, y) => { x + y; }
function add (x, y) { return x + y; }
All of these
Which of the following is a valid function definition to return the sum of 2 numbers passed as parameter?
let add = (x, y) => x + y
let add = (x, y) => { x + y; }
function add (x, y) { return x + y; }
All of these
Correct answer
All of these
Question 13 of 16 in the IIT Madras BS Modern Application Development II (MAD 2) Quiz 1 paper sat on 25 Feb 2024, in the January 2024 term (IIT M DIPLOMA AN2 EXAM QDD2 25 Feb 2024). It carries 3 marks.