HTML Diff
0 added 0 removed
Original 2026-01-01
Modified 2026-03-09
1 <p>Now let’s add a mode that skips every second page.</p>
1 <p>Now let’s add a mode that skips every second page.</p>
2 <p>The mode will be activated at the 'alternate' value of the mode variable.</p>
2 <p>The mode will be activated at the 'alternate' value of the mode variable.</p>
3 <p>To choose whether to print even or odd pages, we will use the variable startPage: if it equals 1, odd pages are printed, and if it equals 2 even pages are printed.</p>
3 <p>To choose whether to print even or odd pages, we will use the variable startPage: if it equals 1, odd pages are printed, and if it equals 2 even pages are printed.</p>
4 <p>Since we have an alternative type of printing, pages are printed in an unusual way. The counter can be called approximately the same as the printing mode alternatePage.</p>
4 <p>Since we have an alternative type of printing, pages are printed in an unusual way. The counter can be called approximately the same as the printing mode alternatePage.</p>
5 <p>Note that the increment is not going to be useful here. The counter will increase by two, that’s why you should use an entry of the type counter = counter + 2 or the shorter version counter += 2.</p>
5 <p>Note that the increment is not going to be useful here. The counter will increase by two, that’s why you should use an entry of the type counter = counter + 2 or the shorter version counter += 2.</p>
6 <p>Now we’ll add a new printing mode, and in the next task, we will experiment with this mode and switch between printing even and odd pages.</p>
6 <p>Now we’ll add a new printing mode, and in the next task, we will experiment with this mode and switch between printing even and odd pages.</p>