JAVASCRIPT BREAK STATEMENT EXAMPLE
Run
<html>
    <head>
        <title>Using Break Statement</title>
    </head>
    <body>
        <h2>Using break statement in while loop</h2>
        <script type="text/javascript">
            let count=0;
            while(count<10)
            {
                ++count;
                if((count%5==0))
                {
                    break;
                }
                else
                {
                    document.write("count is "+count+"<BR/>")
                }
            }
            document.write("while loop terminated");
        </script>
    
    </body>
</html>