Label and Break in javascript

     Any identifier can use as label name. We can use a label to identify a loop and use the break statements to interrupt the execution.

Example

golabel:{
  var i=10;
  var j=15;
  break golabel;
  var k=100; //Will not execute
}


Example Program:- (Editor)


Editor is Loading...

Advertisement

Nhận xét

Bài đăng phổ biến từ blog này

How to set the SDK, NDK and JDK path to android studio?

if statement

Select all values from list box in a single click using javascript