for
loop to a programBelow you will find a payroll that asks the user for the number of times to repeat a message. but it only prints the message once.
Add the necessary for
loop so the program will print the message however many times the user specified.
<html>
<head> <title> Lab Assignment #5</title>
</head>
<body>
<script type = "text/javascript">
var totalTimes;
totalTimes = parseInt(prompt("How many times do you want to print the message", 0));
document.write("<p>I am writing it " + totalTimes +
" times.</p>");
</script>
</body>
</html>