Imagine you are developing a software application for a smartwatch designed for hikers. The application tracks the milestones a hiker has passed on a trail. Each milestone is a significant point marked along the trail.
Given an integer variable milestonesPassed, write a statement that uses the increment operator to increase the value of that variable by 1 and assigns the updated value to the integer variable nextMilestone, which has already been declared.
Note: Write only one statement to perform these operations.
1
Check your answer