What is the result of the expression: 10 % 3?
10 % 3
3
10
0
1
Which event is fired when a user clicks on an HTML element?
onload
onmousedown
onclick
onmouseover
How do you access the value entered into a text input field in a form?
inputElement.text
inputElement.getValue()
inputElement.data
inputElement.value
What is the relationship between HTML, CSS, and JavaScript in web development?
They are completely independent languages.
JavaScript is used to write HTML and CSS code.
CSS is used to write HTML and JavaScript code.
HTML provides structure, CSS styles the content, and JavaScript adds behavior.
Which property is used to set an attribute's value on an HTML element?
element.attributeName = 'value'
element.setAttribute('attributeName', 'value')
None of the above
Both of the above
How can you access the error message from a caught error?
error.toString()
error.text
error.getMessage()
error.message
What does the Array.isArray() method return when passed an object?
Array.isArray()
false
"object"
object
undefined
true
What does the querySelector() method return when it finds multiple matching elements in the DOM?
querySelector()
The last matching element
null
An array of all matching elements
The first matching element
What is the primary role of the browser's JavaScript engine?
Styling web page elements
Fetching data from a server
Interpreting and executing JavaScript code
Defining the structure of a web page
What happens if an error is thrown inside a 'catch' block and there's no outer 'try...catch' to handle it?
The finally block is executed again
The program terminates with an uncaught error
The program continues execution normally
The error is silently ignored