Interactive online courses HTML Academy
2026-03-09 10:53 Diff

Let’s add the printing mode for all pages of the document.

  1. At the end of the program, add a check that compares mode with the value of 'document'.
  2. Inside this check, add a loop that increases the value of page valuable from 1 to totalPages inclusively.
  3. Inside the loop, add the print command for the current page page.
  4. Change the value of the mode variable to 'document'.