Saturday, June 15, 2019

Return

One finds the return statement in Javascript in the context of
a named function, to which one then passes parameters for treatment.
One is then free to call on this result later in the script, or even
in another script. Indeed, one can call a function before it is
defined, and the work will be performed.



The alternative is the anonymous function, which just performs a
task on the fly, and can work with named variables. Understandably,
sequence is important, and one can only call the result later in
the script, or from a subsequent one. The return keyword is not used.


*     *     *



The formula in the example is divergent, and will keep growing...)

*     *     *

No comments: