ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 210 - Certified JavaScript Developer I discussion

Report
Export

A developer writes the code below to calculate the factorial of a given number

function sum(number){

return number * sum(number-1);

}

sum(3);

what is the result of executing the code.

A.
0
Answers
A.
0
B.
6
Answers
B.
6
C.
Error
Answers
C.
Error
D.
-Infinity
Answers
D.
-Infinity
Suggested answer: C
asked 23/09/2024
Avinash Kumar
32 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first