Write statements that perform the following single-subscripted array operations:
a) Set the 10 elements of array counts to zeros.
b) Add 1 to each of the 15 elements of array bonus.
c) Display the five values of array bestScores separated by spaces.
a)
```
for ( var i = 0; i < 10; i++ )
counts[ i ] = 0;
```
b)
```
for ( var i = 0; i < 15; i++ )
bonus[ i ]++;
```
c)
```
for ( var i = 0; i < 5; i++ )
document.write( bestScores[ i ] + “ ” );
```
You might also like to view...
Which of these is not a reason that goal setting motivates team members?
A) It clarifies what must be done to get results. B) It makes explicit what is expected of team members. C) It portrays the operational technology in understandable terms. D) Simply setting goals and monitoring them seems to motivate individuals.
Gets the number of vertices from the input If n <= MAX_VERTICES, fills m with data from file; otherwise signals failure on stream is and sets m size to 0 x 0
What will be an ideal response?