Quiz Board
1. How can you write 'Hello World' in an alert box?

alert("Hello World")

alertBox("Hello World")

msgBox("Hello World")

msg("Hello World")

2. How do you create a function in JavaScript?

function: myFunction()

function = myfunction()

function myFunction()

3. Which event occurs when the user clicks on an HTML element?

onmouseclick

onchange

onmouseover

onclick

4. What is the correct way to write a JavaScript array?

var colors = 1 = ("red"), 2 = ("green"), 3 = ("blue")

var colors = (1:"red", 2:"green", 3:"blue")

var colors = ["red", "green", "blue"]

var colors = "red", "green", "blue"

5. How do you round the number 7.25, to the nearest integer?

round(7.25)

Math.round(7.25)

Math.rnd(7.25)

rnd(7.25)