Exam4Training

const addBy =?

Refer to the code below:

const addBy =?

const addByEight =addBy(8);

const sum = addBYEight(50);

Which two functions can replace line 01 and return 58 to sum? Choose 2 answers
A . const addBy = function(num1){
return function(num2){
return num1 + num2;
}
B. const addBy = function(num1){
return num1 + num2;
}
C. const addBy = (num1) => num1 + num2 ;
D. const addBY = (num1) => (num2) => num1 + num2;

Answer: A,D

Exit mobile version