Pages
HOME
HTML5
CSS3
JAVASCRIPT
PHP
C
SEO/SMM
SOFTWARE
TIPS & TRICKS
PRIVACY POLICY
CONTACTS
Thursday, August 15, 2013
JavaScript break statement
<html>
<body>
<script type="text/javascript">
var i=0;
for (i=0;i<=10;i++)
{
if (i==3)
{
break;
}
document.write("The number is " + i);
document.write("<br />");
}
</script>
<p>Explanation: The loop will break when i=3.</p>
</body>
</html>
Result
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment