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