Question 71
What is a Closure in JavaScript?
Option B is correct. A closure retains access to variables declared in its outer scope even after that outer function execution finishes.
What is a Closure in JavaScript?
Option B is correct. A closure retains access to variables declared in its outer scope even after that outer function execution finishes.
Which method of the JavaScript Document API returns the FIRST element matching a specified CSS selector?
Option A is correct. document.querySelector(selector) returns the first matching Element node in the document.
Which storage mechanism in HTML5 Web Storage API persists data even after the browser window/tab is closed?
Option B is correct. localStorage data has no expiration time; sessionStorage data is cleared when the page session/tab ends.
In PHP, what symbol must prefix ALL variable names?
Option B is correct. In PHP, all variables start with a dollar sign ($), followed by the variable name.
Which superglobal array in PHP is used to collect form data submitted with method='POST'?
Option A is correct. $_POST is an associative array of variables passed to the current script via the HTTP POST method.