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