WGU C777 Web Development Applications OA | Complete
Practice Questions, Correct Answers & Detailed Rationales
(2026/2027)
Question 1
In JavaScript, what is a closure?
A. A function bundled together with references to its lexical
environment.
B. A method used to close open database connections asynchronously.
C. A design pattern that prevents objects from being modified.
D. An event handler that terminates event propagation in the DOM.
Correct Answer: A. A function bundled together with references to its
lexical environment.
Detailed Rationale: A closure gives an inner function access to an outer
function's scope even after the outer function has finished executing
and returned.
Question 2
In CSS Grid Layout, which property allows defining named grid areas
that can be referenced by grid items using grid-area?
A. grid-template-areas
,B. grid-area-names
C. grid-layout-map
D. grid-container-zones
Correct Answer: A. grid-template-areas
Detailed Rationale: The grid-template-areas property specifies named
grid areas, making visual layout design intuitive using string templates.
Question 3
Which HTML5 input attribute automatically focuses the form control
when the page loads?
A. active
B. autofocus
C. selected
D. default-focus
Correct Answer: B. autofocus
Detailed Rationale: The boolean autofocus attribute specifies that an
input element should automatically get focus when the page loads.
,Question 4
Which JavaScript array method creates a populated new array with the
results of calling a provided function on every element in the calling
array?
A. filter()
B. reduce()
C. map()
D. slice()
Correct Answer: C. map()
Detailed Rationale: The map method calls a defined callback function
on each element of an array and constructs a new array from the
results.
Question 5
Which CSS pseudo-class matches every element that is the nth child of
its parent, regardless of its type, counting from the start?
A. :nth-of-type()
B. :nth-child()
C. :first-child()
D. :index-child()
, Correct Answer: B. :nth-child()
Detailed Rationale: The :nth-child(n) pseudo-class selects elements
based on their position in a group of siblings.
Question 6
What is the default event flow phase in which event listeners are
triggered during standard DOM event bubbling?
A. Capturing phase
B. Target phase
C. Bubbling phase
D. Propagation pause phase
Correct Answer: C. Bubbling phase
Detailed Rationale: By default, addEventListener registers listeners in
the bubbling phase, where events propagate upward from the target to
the root.
Question 7
Practice Questions, Correct Answers & Detailed Rationales
(2026/2027)
Question 1
In JavaScript, what is a closure?
A. A function bundled together with references to its lexical
environment.
B. A method used to close open database connections asynchronously.
C. A design pattern that prevents objects from being modified.
D. An event handler that terminates event propagation in the DOM.
Correct Answer: A. A function bundled together with references to its
lexical environment.
Detailed Rationale: A closure gives an inner function access to an outer
function's scope even after the outer function has finished executing
and returned.
Question 2
In CSS Grid Layout, which property allows defining named grid areas
that can be referenced by grid items using grid-area?
A. grid-template-areas
,B. grid-area-names
C. grid-layout-map
D. grid-container-zones
Correct Answer: A. grid-template-areas
Detailed Rationale: The grid-template-areas property specifies named
grid areas, making visual layout design intuitive using string templates.
Question 3
Which HTML5 input attribute automatically focuses the form control
when the page loads?
A. active
B. autofocus
C. selected
D. default-focus
Correct Answer: B. autofocus
Detailed Rationale: The boolean autofocus attribute specifies that an
input element should automatically get focus when the page loads.
,Question 4
Which JavaScript array method creates a populated new array with the
results of calling a provided function on every element in the calling
array?
A. filter()
B. reduce()
C. map()
D. slice()
Correct Answer: C. map()
Detailed Rationale: The map method calls a defined callback function
on each element of an array and constructs a new array from the
results.
Question 5
Which CSS pseudo-class matches every element that is the nth child of
its parent, regardless of its type, counting from the start?
A. :nth-of-type()
B. :nth-child()
C. :first-child()
D. :index-child()
, Correct Answer: B. :nth-child()
Detailed Rationale: The :nth-child(n) pseudo-class selects elements
based on their position in a group of siblings.
Question 6
What is the default event flow phase in which event listeners are
triggered during standard DOM event bubbling?
A. Capturing phase
B. Target phase
C. Bubbling phase
D. Propagation pause phase
Correct Answer: C. Bubbling phase
Detailed Rationale: By default, addEventListener registers listeners in
the bubbling phase, where events propagate upward from the target to
the root.
Question 7