In the mentioned factorial example why are we using reduce instead of loops. As a beginner I find using loop easier than using reduce . why are we using reduce when the same thing can be done using loops?
Reduce in Arrays
@swetanagarro it is just syntactic sugar, you can use both loops or reduce, reduce is js functions, whose deep down implementation is loops itself
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.