I am afraid I do not deep understand this note:
Note: Like Storing Values with the Assignment Operator, all function calls will be resolved before the
return executes, so we can
return the value of the
I don’t understand what could be the probleme.
Could you please say me more about it ?
When you use the
return keyword to exit the function and resolve to a value, it waits until all of the code to the right of it has resolved first.
let myRand = Math.random();
// gives the exact same result as
For me it’s same situation as:
let myRand = a + b;
Is there other situations where right part of code is not resolve first ?
For both the assignment operator (
=) and the
return keyword, the code on the right will always resolve first.
Ok It was just for that.
I thought there was something more complicated.
Thanks a lot
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.