Write a java script to break the for loop
<!DOCTYPE html>
<html>
<body>
<script>
names=["Geetha","Siri","Rani","Lakshmi"];
for (var i=0;i<names.length;i++)
{
document.write(names[i] + "<br>");
}
</script>
</body>
</html>
Geetha
Siri
Rani
Lakshmi
Output:
Geetha
Siri
Rani
Lakshmi
No comments:
Post a Comment