Please help with these practice exercises, having these intomorrow\'s 3rd exam:
ID: 3618221 • Letter: P
Question
Please help with these practice exercises, having these intomorrow's 3rd exam:1. Using a do.....while loop, create a document that will displayalert boxes with the message "You are counting by 10's: 10; then"You are counting by 10's: 20; etc until you reach "You arecounting by 10's: 100".
2. Modify #1 by using a while loop and the use statements(not alert boxes) to display "You are counting by 10's: 10", untilyou get to 100.
3. Create an HTML document that crates an array with your favorite10 foods and lists your favorite foods. Also includestatements that will display the elements of your array.
Please help with all 3 problems. Thanks for your help.
Explanation / Answer
Dear... 1) <HEAD><TITLE>JavaScript 1</TITLE>
<SCRIPT language="JavaScript"> var i=10; while(i<=100) { alert("You are counting by10's:"+i) i=i+10;
}
</script>
</body>
</html> 2) <HEAD>
<TITLE>JavaScript 1</TITLE>
<SCRIPT language="JavaScript"> var i=10; while(i<=100) { document.write("You arecounting by 10's:"+i) i=i+10;
}
</script>
</body>
</html>
Hope this will help you..
2) <HEAD>
<TITLE>JavaScript 1</TITLE>
<SCRIPT language="JavaScript"> var i=10; while(i<=100) { document.write("You arecounting by 10's:"+i) i=i+10;
}
</script>
</body>
</html>
Hope this will help you.. <HEAD>
<TITLE>JavaScript 1</TITLE>
<SCRIPT language="JavaScript"> var i=10; while(i<=100) { document.write("You arecounting by 10's:"+i) i=i+10;
}
</script>
</body>
</html>
Hope this will help you..
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.