Question: Bring up the web page scriptTrace.html. Add a break point to the first line of executable code in the function findMin. Run the program using

Bring up the web page scriptTrace.html. Add a break point to the first line of executable code in the function findMin. Run the program using the 1st button. When it stops inside findMin step through the program and answer the following questions. To reset values, reload the page.

a. On a fresh reload of the web page, what is the data type of i before the first call to Math.sqrt? After? (If dont reload the web page the value of i may be from a previous run of the program.)

b. What are the values of position when minItem changes?

c. When position is 2, change the value of list by typing in and executing the following code in the command panel:

list[2.5]= 'Elmer'; list['CENG256]= 'Aaron'; list[-1]= 'Terry';

Continue stepping through the code until the function is complete. Does the code check the new values? If so, when?

scriptTrace.html

Sample Code to Trace

These functions are for you to trace as an exercise

The functions below are used in class as examples to trace


Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!