Question: The two code segments below are intended to display the same value. Code Segment 1 is complete. Code Segment 2 is missing a value in

The two code segments below are intended to display the same value. Code Segment 1 is complete. Code Segment 2 is missing a value in the inner FOR loop. What value should be entered in the inner FOR loop of Code Segment 2 to give the same result as is displayed by Code Segment 1?
CODE SEGMENT 1
var count =0;
for(var i=1;i5;i=i+1
for
count = count +1 ;
}
}
document.write(count +"");
CODE SEGMENT 2
var count =0;
for
for
count = count +2 ;
}
}
document.write(count +"");
 The two code segments below are intended to display the same

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!