259 B
259 B
importance: 5
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 recursive
setTimeout
.