79151672

Date: 2024-11-02 22:17:14
Score: 4
Natty:
Report link

In JavaScript, a simple for loop (like the one in your function) is synchronous. This means each iteration of the loop runs to completion before moving on to the next one, and the function doesn't reach the return statement until the loop has finished all its iterations. Why do you think it is returning before ending the for loop?

Reasons:
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Mathi Mix