255 B
255 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 nested
setTimeout.