Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.

Instruction

Add One to a Number with the Increment Operator (++)

Increment operator

Here's a tip. It's so common in JavaScript to increment a number value by one that there's a shorthand operator (called the "increment operator") that's used frequently with loops. Use it on your counter variable by replacing += 1 with two plus symbols (++).

  1. Open the file do-while.js.
  2. In the do block, use the increment operator to increase th...