- 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
page++withpage += 2to increase the page number by two. - Change the number of pages from
7to12.
Comments