David is noticing that a certain piece of computation inside his loop doesn't need to be executed every iteration. What can he use to skip that computation for specific iterations?

  • continue statement
  • for loop
  • if statement
  • switch statement
David can use the continue statement to skip a certain piece of computation for specific iterations within his loop. When continue is encountered, it causes the program to skip the remaining code within the current iteration and move on to the next iteration of the loop. This can improve the efficiency of the loop when certain conditions don't require the computation to be executed.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *