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...
What is wrong with this code?
``` int Money4Me( int dollars ) { int pennies, coins; coins = dollars * 100; }``` A. The function name is invalid. B. There is no return type. C. You can’t have math statements inside a function. D. Nothing is wrong with it.
Which of the following is NOT a typical component of a dialog box?
A) Spin arrows B) Text boxes C) Title bar D) Check boxes
When you create a new presentation from a template, the original template ________ file extension is not changed
Fill in the blank(s) with correct word
When several worksheets are grouped, inserting a row ________
A) inserts it only into the first worksheet in the group B) inserts it into all of the worksheets in the group C) displays an error message D) fails to insert a row into any of the worksheets in the group