- script.js
JavaScript
var mode = 'pageCopy'; // Printing driver mode
var pageNumber = 5; // Copied page number
Result
GoalsCompleted 0 out of 4
Let’s add the printing mode for all pages of the document.
- At the end of the program, add a check that compares
mode
with the value of'document'
. - Inside this check, add a loop that increases the value of
page
valuable from1
tototalPages
inclusively. - Inside the loop, add the print command for the current page
page
. - Change the value of the
mode
variable to'document'
.
Comments