2025/ 2026 Update) | Q/A | 100% Correct
(Verified Answers)
Which two JavaScript characteristics have the most effect on a developer's workflow? (Choose
two answers.) -:answers :-JavaScript is an event-driven language,
JavaScript requires rigor in specification.
What is the role of the reserved word function in a JS statement? -:answers :-Defines the
beginning of a block of commands
Which two items are basic variable data types in JavaScript? (Choose two answers.) -:answers :-
String,
Boolean
What is the value of the variable a after the execution of the JS command if the variable a starts
with the numeric value 5 in the following code snippet?
a += 7 % 3; -:answers :-6
Which two options are valid JavaScript events? (Choose two answers.) -:answers :-onclick,
onmouseout
What is an event handler? -:answers :-a JavaScript function
,Which text represents the event handlers in this code snippet?
<button id="magicButton" type="button" onclick="makeItRed()"
onmouseover="makeItYellow()" onmouseout="makeItGreen()">The Magic Button</button> -
:answers :-makeItRed(), makeItYellow(), and makeItGreen()
Which two placement options are valid for JavaScript in a web page? (Choose two answers.) -
:answers :-internal,
inline
Which statement describes the role of a function in JavaScript code? -:answers :-It packs up
commands to perform a task on the page.
Which code should a web developer use to define a function in JavaScript? -:answers :-function
test(a, b) {...}
Which change is necessary to make the declaration accept the function to be called without
input parameters but still return a number?
function sum(a, b) {return a+b} -:answers :-function sum(a=0, b=0)
Which two code examples are valid DOM window methods? (Choose two answers.) -:answers :-
confirm('Hello World!')
alert('Hello World!')
Which two JavaScript commands have errors? (Choose two answers). -:answers :-if (a => b) {
toggle = true; }
alert "Hello World!';
, What is the Document Object Model (DOM)? -:answers :-A logical structure for accessing and
manipulating HTML or XML documents
What are three reasons why a tree is a good representation of a web page?
Choose 3 answers. -:answers :-An HTML element can have many children,
An HTML element can only ever have one parent,
It can accurately represent the nesting of elements in an HTML document.
What is a programming API? -:answers :-A set of well-defined functions which can be used to
interact with a system
Which browser API is used when an online shopping site suggests a user's nearest physical
store? -:answers :-Geolocation
Which browser API requests a user's permission to open a file directly without uploading it? -
:answers :-File system access
Which code is used to retrieve the two dimensional drawing context of a canvas element? -
:answers :-var ctx = canvas.getContext('2d');
Which three types of information are provided by a successful Geolocation request?
Choose three answers. -:answers :-Altitude, Longitude, Latitude
Which three actions are made possible by the HTML5 File API?