List of questions
Related questions
Question 78 - Certified JavaScript Developer I discussion
Which two code snippets show working examples of a recursive function?
Choose 2 answers
A.
Let countingDown = function(startNumber) {If ( startNumber >0) {console.log(startNumber) ;return countingDown(startNUmber);} else {return startNumber;}};
B.
Function factorial ( numVar ) {If (numVar < 0) return;If ( numVar === 0 ) return 1;return numVar -1;
C.
Const sumToTen = numVar => {If (numVar < 0)Return;return sumToTen(numVar + 1)};
D.
Const factorial =numVar => {If (numVar < 0) return;If ( numVar === 0 ) return 1;return numVar * factorial ( numVar - 1 );};
Your answer:
0 comments
Sorted by
Leave a comment first