ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 128 - Certified JavaScript Developer I discussion

Report
Export

A developer implements a function that adds a few values.

Function sum(num) {

If (num == undefined) {

Num =0;

}

Return function( num2, num3){

If (num3 === undefined) {

Num3 =0 ;

}

Return num + num2 + num3;

}}

Which three options can the developer invoke for this function to get a return value of 10 ?

Choose 3 answers

A.
Sum () (20)
Answers
A.
Sum () (20)
B.
Sum (5, 5) ()
Answers
B.
Sum (5, 5) ()
C.
sum() (5, 5)
Answers
C.
sum() (5, 5)
D.
sum(5)(5)
Answers
D.
sum(5)(5)
E.
sum(10) ()
Answers
E.
sum(10) ()
Suggested answer: C, D
asked 23/09/2024
John Ordonez
30 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first