Web Development Flashcards
7 cards from real Web Development practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 Web Development flashcards as text
What is the purpose of a Service Worker in web development?
Answer: Runs in the background to enable offline caching, push notifications, and background sync
Service Workers are scripts that run in the background, intercepting network requests to enable offline functionality and progressive web app features.
In JavaScript, what is the difference between '==' and '==='?
Answer: == checks value only with type coercion; === checks both value and type without coercion
The == operator performs type coercion before comparison, while === requires both the value and the type to be identical.
Which attribute makes an HTML form input required before form submission?
Answer: required
The required attribute on an input element prevents form submission and shows a browser validation message if the field is empty.
What does 'tree shaking' mean in the context of JavaScript bundlers like Webpack or Rollup?
Answer: Eliminating unused exported code from the final bundle
Tree shaking analyzes ES module imports and removes code that is exported but never imported anywhere, reducing bundle size.
What is the role of the 'alt' attribute on an element?
Answer: Provides alternative text for screen readers and when the image fails to load
The alt attribute supplies descriptive text used by screen readers for accessibility and displayed by browsers when an image cannot be loaded.
Which JavaScript array method returns a NEW array with only the elements that pass a test function?
Answer: Array.filter()
Array.filter() creates and returns a new array containing only the elements for which the callback function returns true.
In web development, what does 'lazy loading' an image accomplish?
Answer: Defers loading off-screen images until they are about to enter the viewport
Lazy loading delays fetching images that are not yet visible, reducing initial page load time and saving bandwidth for users who don't scroll far.
How this page was made: written with AI tools. We have not yet matched this exam's facts to an official source, so confirm fees, dates and rules with the exam body. Not reviewed by a subject-matter expert. Editorial policy