- script.js
JavaScript
var totalPages = 5;
for (var page = 1; page <= totalPages; page = page + 1) {
  muffin.print(page);
}
Result
Goalscompleted
Let’s print the pages in reverse order.
- Change the initial value of pagefrom one tototalPages.
- The loop must be executed while pageis above zero.
- After each iteration pageshould decrease by one.
Comments