The break statement exits a while loop and continues executing the code that follows the loop at line number ________.
- immediately
- next
- specified
- labeled
The 'break' statement exits a while loop immediately and continues executing the code that follows the loop at the next line. It allows you to prematurely terminate a loop based on a certain condition, without completing the remaining iterations.
Loading...
Related Quiz
- Can arrow functions be used as constructors?
- Which method would you use to add a new property to an object after it has been created?
- What is the common problem addressed by using asynchronous code in JavaScript?
- Which of the following best describes a JavaScript callback function?
- While working on a project, you found out that the API you are fetching data from sends relevant error messages in the body of the response, even when the request fails. How do you extract and use this error message in JavaScript?