BeginnerJavaScriptVariables

Trace the variable

Read each line in order and identify the final value printed by the program.

Problem

The variable starts at 2. The assignment operator += adds one and stores the result back in the same variable.

Expected answer

Enter only the value printed by console.log.

Reveal a hint

Rewrite completedLessons += 1 as completedLessons = completedLessons + 1.

Review the variables lesson