ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 35 - Certified JavaScript Developer I discussion

Report
Export

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

Function factorial(number) {

Return number + factorial(number -1);

} factorial(3); What is the result of executing line 04?

A.
0
Answers
A.
0
B.
6
Answers
B.
6
C.
-Infinity
Answers
C.
-Infinity
D.
RuntimeError
Answers
D.
RuntimeError
Suggested answer: D
asked 23/09/2024
Tony Hartzell
34 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first