Is there a way to concatenate two for loops? Is it even possible?
My code is below...Thank you in advance.
<html>
<head>
<title>String Loop</title>
<script type="text/javascript">
var name=new Array(20);
for (i=0;i<=20;i++)
{
name[i]= prompt("what is your name?");
}
for (i=0;i<=20;i++)
{
document.write(name[i]+ " " + name[i].length +'<BR>');
}
</script>
</body>
</html>


Reply With Quote
Bookmarks