Development
Finals Assessment Review
(Questions & Solutions)
2025
©2025
, Q1. Which of the following CSS property changes is most likely to
trigger a browser reflow?
A. Changing the text color
B. Changing the background color
C. Changing the width of an element
D. Changing the opacity of an element
ANS: C (Changing the width of an element)
Rationale: Altering an element’s width affects its geometry, forcing the
browser to recalculate layouts—a process known as reflow—whereas
changes like color or opacity only trigger repaints.
---
Q2. Which method is central to frameworks like React for updating the
UI efficiently while minimizing direct DOM manipulation?
A. Data binding
B. Virtual DOM diffing
C. Two-way binding
D. Shadow DOM encapsulation
ANS: B (Virtual DOM diffing)
Rationale: React’s virtual DOM diffing algorithm calculates differences
between virtual DOM snapshots and updates only the parts of the real
DOM that changed, thereby improving performance.
---
Q3. Which CSS layout system is explicitly designed for managing two-
dimensional layouts (rows and columns) simultaneously?
A. Flexbox
B. Grid Layout
C. CSS Float
D. Table Layout
ANS: B (Grid Layout)
©2025
, Rationale: CSS Grid Layout is built to handle both rows and columns
concurrently, unlike Flexbox which is optimized for one-dimensional (row
or column) layouts.
---
Q4. What is the primary function of a service worker in a Progressive
Web App (PWA)?
A. To apply CSS transformations
B. To handle offline caching and network request interception
C. To render JavaScript templates
D. To validate form data
ANS: B (To handle offline caching and network request interception)
Rationale: Service workers run in the background, intercepting network
requests and caching resources—key features for offline functionality
and performance enhancements in PWAs.
---
Q5. Which JavaScript feature facilitates asynchronous operations and is
typically used to manage asynchronous code flow?
A. Closures
B. Promises
C. Immediately Invoked Function Expressions (IIFEs)
D. Prototype inheritance
ANS: B (Promises)
Rationale: Promises provide a structured way to handle asynchronous
operations, and modern syntax (async/await) builds on promises to
further streamline asynchronous programming.
---
Q6. Which front-end framework is well known for its component-based
architecture and use of a virtual DOM?
A. Angular
©2025