chapter 6: functions

Task 1

Output every Second

Write a function printNumbers(from, to) that ouputs a number every second, starting from from and ending with to.

make two variants of the solution.

  1. Using setInterval.
  2. Using setTimeout.