Try it
Javascript
Jquery
Angular
Learn Angular
Learn Javascript
Learn Bootstrap
Learn jQuery
break-2
Example of JavaScript
break
statement:
<!DOCTYPE html> <html> <head> <title>Welcome to LearnKode - A code learning platform</title> </head> <body> <p id="sample"></p> <script> var x = 1; document.write("Entering the loop<br /> "); while (x < 10) { if (x == 4){ break; } x = x + 1; document.write( x + "<br />"); } document.write("Exiting the loop!<br /> "); </script> </body> </html>
Output
×
Save This try
Title
Description
<p>Example of JavaScript <code>break</code> statement:</p>