Output every Second
Write a function
printNumbers(from, to) that
ouputs a number every second, starting from
from and ending with
to.
make two variants of the solution.
-
Using
setInterval. -
Using
setTimeout.