Question: Insert the loops from parts A , and B below into a script element in the body below an h 1 that says Last Lab!
Insert the loops from parts A and B below into a script element in the body below an h that says Last Lab! Run the code and insert comments that answer the questions.
A How many times does the following loop execute?
B What is written to the document by the following loop?
Below those loops add two more loops:
a Write the code for a while loop that outputs these values: using document.write.
b Write a loop to add the numbers from to and only output the sum in an alert box. Hint: Add the values in the loop and put the alert below of the loop.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
