ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 40 - Certified JavaScript Developer I discussion

Report
Export

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;}
Answers
A.
const addBy = function(num1){ return function(num2){ return num1 + num2;}
B.
const addBy = function(num1){ return num1 + num2;}
Answers
B.
const addBy = function(num1){ return num1 + num2;}
C.
const addBy = (num1) => num1 + num2 ;
Answers
C.
const addBy = (num1) => num1 + num2 ;
D.
const addBY = (num1) => (num2) => num1 + num2;
Answers
D.
const addBY = (num1) => (num2) => num1 + num2;
Suggested answer: A, D
asked 23/09/2024
IGNACIO CHICO TORRES
37 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first