explain break statement with suitable example
Answers
Answered by
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
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...
# 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
Social Sciences,
8 months ago
Hindi,
8 months ago
English,
1 year ago
English,
1 year ago
Math,
1 year ago