Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce Exam Javascript Developer I Topic 2 Question 71 Discussion

Actual exam question for Salesforce's Javascript Developer I exam
Question #: 71
Topic #: 2
[All Javascript Developer I Questions]

Which two code snippets showworking examples of a recursive function?

Choose 2 answers

Show Suggested Answer Hide Answer
Suggested Answer: C

Contribute your Thoughts:

Whitley
27 days ago
Wait, is this a test on recursion or a stand-up comedy routine? I'm ready to bring the house down with some recursive jokes!
upvoted 0 times
...
Tracie
28 days ago
Aha! I've got it. A and D are the winners here. Time to show off my recursive superpowers!
upvoted 0 times
Wynell
1 days ago
User 2: Agreed, those two show working examples of recursive functions.
upvoted 0 times
...
Arlean
2 days ago
User 1: I think A and D are the correct answers.
upvoted 0 times
...
...
Carlee
1 months ago
Hold up, is this a trick question? I feel like I'm about to get recursion-wrapped and thrown down a rabbit hole.
upvoted 0 times
...
Augustine
1 months ago
Hmm, B and C seem a bit off. I'm pretty sure they're not quite recursive enough. Time to put on my thinking cap!
upvoted 0 times
Dean
11 days ago
A) Let countingDown = function(startNumber) {If ( startNumber >0) {console.log(startNumber) ;return countingDown(startNUmber);} else {return startNumber;}};
upvoted 0 times
...
...
Helene
1 months ago
Ooh, A and D look like they'll do the trick! I can almost smell the recursion working its magic.
upvoted 0 times
Alverta
1 months ago
D) Const factorial =numVar => {If (numVar < 0) return;If ( numVar === 0 ) return 1;returnnumVar * factorial ( numVar - 1 );};
upvoted 0 times
...
Thea
1 months ago
A) Let countingDown = function(startNumber) {If ( startNumber >0) {console.log(startNumber) ;return countingDown(startNUmber);} else {return startNumber;}};
upvoted 0 times
...
...
Mary
2 months ago
I'm not sure, but I think A and D make sense because they call themselves within the function.
upvoted 0 times
...
Kimberlie
2 months ago
I agree with you, Novella. A and D seem to be recursive functions.
upvoted 0 times
...
Novella
2 months ago
I think options A and D are the correct ones.
upvoted 0 times
...
Afton
2 months ago
I'm not sure about option A, but I think option D is definitely a recursive function. It calculates factorial by calling itself with a smaller number.
upvoted 0 times
...
Ty
2 months ago
I agree with you, Lindsay. Option A uses recursion to count down, and option D calculates factorial recursively.
upvoted 0 times
...
Lindsay
2 months ago
I think options A and D are the working examples of recursive functions.
upvoted 0 times
...

Save Cancel