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...

An int variable can hold __________.

a. 'x' b. 120 c. 120.0 d. "x" e. "120"

Computer Science & Information Technology

You can only select contiguous frames.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology