Write code which randomly chooses a number from 1 to 10. It should then display low if the number is 5 or less, otherwise it should display high.

What will be an ideal response?


One possible answer:
```
if Math.round(Math.random()) > 0.5;{
document.write(“low”);
}
else {
document.write(“high”);
```

Computer Science & Information Technology

You might also like to view...

Benjamin recently issued new mobile phones to the marketing team at his company. Each phone can transmit encrypted information for payments made at a retail checkout counter. The technology also allows the marketing team to share data quickly.   What technology is set up on the marketing team’s phones?

A. Bluetooth B. Tethering C. NFC D. Hotspot

Computer Science & Information Technology

All of the following are special keys, except _____.

A. Ctrl B. Enter C. Esc D. Alt

Computer Science & Information Technology

To display the Filter By Form window, on the Home tab in the Sort & Filter group, you click the ________ button, then from the shortcut menu, select Filter By Form

A) Select B) Advanced Filter Options C) Form Filters D) Choose

Computer Science & Information Technology

Choose the correct pronoun in the following sentence.Each of the comets has _________ own orbit.?

A. ?its B. ?their

Computer Science & Information Technology