en.javascript.info/1-js/06-advanced-functions/08-settimeout-setinterval/1-output-numbers-100ms/task.md
Ilya Kantor 97c8f22bbb up
2017-03-21 17:14:05 +03:00

13 lines
260 B
Markdown

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.
1. Using `setInterval`.
2. Using recursive `setTimeout`.