Which method removes the first element from an array and returns it?
slice()
unshift()
shift()
pop()
What does 'client-side' JavaScript refer to?
JavaScript code used for server maintenance
JavaScript code executed on a web server
JavaScript code used for database management
JavaScript code executed on the user's web browser
Which block of code is executed regardless of whether an error is thrown or caught?
catch
try
throw
finally
Which keyword is used to declare a variable in JavaScript with block-level scope?
var
block
let
const
What keyword is used in JavaScript to attempt a block of code that might throw an error?
Which logical operator returns true if and only if both operands are true?
true
NOT (!)
OR (||)
XOR (^)
AND (&&)
Why is JavaScript considered a 'dynamic' language?
It allows for the creation of visually appealing websites.
It enables changes to a webpage's content and behavior after it has loaded.
It enforces strict data types for variables.
It is a very old programming language.
Is it possible to have multiple 'catch' blocks associated with a single 'try' block?
Only if you re-throw the error inside the first 'catch'
No, you can only have one 'catch' per 'try'
Only if the 'try' block is nested inside another 'try'
Yes, to handle different error types specifically
What is the correct way to add a new property 'city' with value 'New York' to the object person from the previous question?
person
person['city'] = 'New York'
person.push('city', 'New York')
person.city = 'New York'
Object.assign(person, {city: 'New York'})
Which of the following is NOT a built-in function in JavaScript for interacting with the user through the browser?
prompt()
alert()
confirm()
console.log()