- script.js
JavaScript
var totalPages = 7;
for (var page = 1; page <= totalPages; page++) {
muffin.print(page);
}
Result
Goalscompleted
Let’s print only odd pages.
- Replace the operation of increasing the page number from
page++topage += 2. - Change the number of pages from
7to12.
Comments