Which event is commonly used for handling form submissions?
'input'
'change'
'click'
'submit'
What does the 'throw' keyword do in JavaScript error handling?
Defines a custom error type
Generates a new error object
Prints the error message to the console
Catches a thrown error
How do you access the value associated with the key 'name' in the object person = {name: 'John', age: 30}?
person = {name: 'John', age: 30}
person['name']
person.name
person.get('name')
person[0]
In JavaScript, how can you access the value of the arguments passed to a function?
Using the 'params' array.
Using the 'arguments' object.
By accessing function parameters directly.
Through the 'this' keyword.
What will the following code snippet log to the console?
console.log(5 + '5');
Error
NaN
55
10
Which of the following is NOT a feature of JavaScript?
Object-oriented programming capabilities
Interpreted language
Client-side scripting language
Strongly typed language
Which tool in the browser's developer tools is most commonly used for debugging JavaScript code?
Network Tab
Elements Panel
Console
Application Tab
Which loop in JavaScript is best suited for iterating through the properties of an object?
for...in
for
while
do-while
How can you change the text content of an HTML element using JavaScript?
element.innerHTML = 'New text'
element.innerText = 'New text'
element.textContent = 'New text'
All of the above
What will be the output of the following code?
let i = 0; while (i < 5) { console.log(i); i++; }
0 1 2 3 4
1 2 3 4 5
0 1 2 3 4 5
1 2 3 4