Computer Science, asked by shaleen71, 1 year ago

explain break statement with suitable example

Answers

Answered by hdonadaun
4

Whenever a break statement is encountered inside a loop, the control directly comes out of loop and the loop gets terminated for rest of the iterations. It is used along with if statement, whenever used inside loop so that the loop gets terminated for a particular condition.


The important point to note here is that when a break statement is used inside a nested loop, then only the inner loop gets terminated.


hdonadaun: plzz mark it as brainliest
Answered by abhinash49
3
The defination of break statement in javascript......is..

# It is a statement which is used to jump out of a loop or a swith.

# EXAMPLE = I cant show that but u can write any javascript program in html using loop than u can surely code it after If statement .........


THNX...
Similar questions