13 lines
259 B
Markdown
13 lines
259 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 `to`.
|
|
|
|
Make two variants of the solution.
|
|
|
|
1. Using `setInterval`.
|
|
2. Using recursive `setTimeout`.
|
|
|