> Is it possible for setTimeout or setInterval to use
functions that return
> values? If so, how would it look code-wise?
If you mean "can I invoke a function that returns a value in
setInterval?" , the answer is yes and the syntax is the same
as when you
use a function that does not return a value.
if you mean "can I use the return value of a function from
setInterval call?", answer is no, the return value will be
achieve that, you have to use a more sophisticated approach.
invoke setInterval with a wrapper function that calls your
and does something with the return value.