0

If I want to call multiple functions in JavaScript, which function will run first?

Like in this example:

sum(range(1, 10));

Does the sum function run first or does the range function run first?

I am not sure which one runs first.

Sebastian Simon
  • 18,263
  • 7
  • 55
  • 75
user1234Es
  • 11
  • 1
  • Only "lazy" languages call the function before evaluating the argument expressions. Most common programming languages are not lazy, arguments are evaluated and passed to the function. – Barmar Nov 22 '22 at 00:05

0 Answers0