Top 30 Easy Frontend Dev Concepts Quiz for Beginners
30 easy multiple-choice Frontend Dev concept questions, the vocabulary and first principles, the parts you need before anything else makes sense. They come from 30 bites in the Frontend Dev library, the gentlest slice of the 588 Frontend Dev concept questions in the library. Answer them here or read straight down. Every question carries the correct option, why it is correct, and a link to the bite it came from.
Frontend web development and UI engineering
30 questions. Pick an answer, or open “Show the answer” to read it.
Answers are graded in your browser. Nothing is saved, and no XP or streak is earned here. The app keeps score.
Question 1 of 30
What is the primary advantage of Vue's progressive philosophy for a project starting small but potentially growing into a full SPA?
Show the answer
Answer: b · It enables developers to integrate only the necessary parts of its ecosystem, scaling functionality as needed.
The progressive philosophy allows Vue to be adopted incrementally, starting with its core library for small enhancements and gradually integrating more of its ecosystem as the project's complexity grows. Option A is incorrect because Vue is designed to be less opinionated, offering flexibility rather than strict guidance from the outset.
Read the full bite: Vue: The Progressive Framework Philosophy
Question 2 of 30
What is the main advantage of using type annotations in TypeScript?
Show the answer
Answer: d · They allow the TypeScript compiler to identify type errors during development.
The card emphasizes that type annotations enable TypeScript to catch type mismatches during development, preventing bugs before runtime. They are erased during compilation and add no runtime overhead, meaning they do not perform runtime validation.
Read the full bite: TypeScript Type Annotations: Defining Your Data's Shape
Question 3 of 30
What is the fundamental nature of a React Component?
Show the answer
Answer: d · A JavaScript function that returns a description of UI using JSX.
The card explicitly states, "A React component is a JavaScript function that returns a piece of UI" and that it returns "JSX" to describe the UI. While components are analogous to custom HTML tags, their core implementation is a JavaScript function.
Read the full bite: React Components: Your UI Building Blocks
Question 4 of 30
Which sequence correctly describes the CSS Cascade's tie-breaking process for style conflicts?
Show the answer
Answer: c · Origin and Importance, then Specificity, then Source Order
The cascade first considers the rule's origin and importance (e.g., !important declarations). If still a tie, it then compares the specificity of the selectors. Finally, if all else is equal, the rule defined later in the code (source order) wins.
Read the full bite: CSS Cascade: How Browsers Resolve Style Conflicts
Question 5 of 30
What is the fundamental nature of JSX in a React application?
Show the answer
Answer: d · It is a syntax extension that a build tool converts into standard JavaScript function calls.
The card explains that JSX is a "syntax extension" that "gets compiled into plain JavaScript objects" by a "compiler (like Babel)" into "React.createElement() function calls." Option C is incorrect because the card explicitly states JSX is "not a string, nor is it HTML."
Read the full bite: JSX: Putting HTML Inside Your JavaScript Components
Question 6 of 30
What is a key characteristic of Angular's 'batteries-included' philosophy?
Show the answer
Answer: b · It provides a complete, integrated toolkit, promoting consistency and reducing decision fatigue.
Angular's 'batteries-included' approach means it provides a comprehensive, integrated toolkit for common needs like routing and forms, which promotes consistency and reduces decision fatigue. Option C is incorrect because Angular's opinionated nature limits flexibility in favor of integration and consistency.
Read the full bite: Angular: The 'Batteries-Included' Framework
Question 7 of 30
When would a TypeScript tuple be the most appropriate choice compared to an array?
Show the answer
Answer: d · To represent a single point in 2D space, like [x-coordinate, y-coordinate].
A tuple is ideal for fixed-length structures where the position and type of each element are important, such as a coordinate pair. An array is used for variable-length lists of elements of the same type, making options A, C, and D incorrect.
Read the full bite: TypeScript's Basic Types: The Building Blocks
Question 8 of 30
An HTML div element has id="main" and class="active". Which CSS rule will apply its color?
Show the answer
Answer: c · div#main { color: red; }
The rule div#main has a specificity score of 1-0-1 (one ID, one type selector), which is higher than #main (1-0-0), .active (0-1-0), and div.active (0-1-1) when comparing the scores from left to right. The ID column takes precedence over the class and type columns.
Read the full bite: CSS Specificity: The Browser's Tie-Breaking Rule
Question 9 of 30
What is the primary benefit of Svelte's architecture as a compiler, rather than a traditional runtime framework?
Show the answer
Answer: a · It generates highly optimized, vanilla JavaScript during the build process, eliminating the need for a runtime library in the browser.
The card emphasizes that Svelte shifts work from runtime to compile time, generating efficient vanilla JavaScript and avoiding a large runtime library, which leads to smaller bundles and improved performance. While Svelte does offer a declarative syntax (option C), this is a feature of many frameworks and not the primary benefit of its *compiler* architecture.
Read the full bite: Svelte: A Compiler, Not Just a Framework
Question 10 of 30
Which statement accurately describes a core principle of how React components should handle props?
Show the answer
Answer: b · Props facilitate a one-way data flow, allowing data to be passed from parent to child components.
The card states that props establish a 'clear, one-way data flow from parent components to child components.' This ensures predictability and reusability. Option A is incorrect because a component should never modify the props it receives; that's what state is for.
Read the full bite: React Props: Arguments for Your Components
Question 11 of 30
An element has width: 200px, padding: 20px, and border: 5px. What is its final rendered width with box-sizing: content-box?
Show the answer
Answer: d · 250px
With box-sizing: content-box, the specified width (200px) applies only to the content area. The padding (20px on each side) and border (5px on each side) are then added outside this content, resulting in a total width of 200 + (2*20) + (2*5) = 250px. Option A (200px) would be the result if box-sizing: border-box were used.
Question 12 of 30
What is the primary advantage Angular gains by building upon TypeScript?
Show the answer
Answer: a · It provides static type checking and structural contracts, crucial for building large, maintainable, and error-resistant applications.
The card states that TypeScript provides static type checking and structural guarantees, which are essential for Angular to build large, scalable, and maintainable applications by catching errors early. Option C is incorrect because while TS compiles to optimized JS, its primary benefit for Angular is not just runtime speed but compile-time safety and structure.
Question 13 of 30
What is the main advantage of using a React Fragment (e.g., <></>) over a <div> when a component needs to return multiple elements?
Show the answer
Answer: d · Fragments prevent the addition of an unnecessary wrapper DOM node, maintaining cleaner HTML structure.
React Fragments are designed to group multiple elements for React's internal processing without adding an extra DOM node to the final HTML, which is essential for valid HTML structures and avoiding unwanted styling issues. Fragments themselves do not add a DOM node, so they cannot have CSS classes or event listeners applied to them directly.
Read the full bite: React Fragments: Group Elements Without a Wrapper
Question 14 of 30
Why do properties like width, margin, and padding typically not inherit in CSS?
Show the answer
Answer: a · Because inheriting them would often lead to broken layouts and unusable pages.
The card explicitly states that properties like width, height, padding, margin, and border do not inherit because it would usually be undesirable, leading to unusable pages. The other options present plausible but incorrect reasons not mentioned in the card.
Question 15 of 30
According to the card, what is a key reason to prefer class selectors over ID selectors when styling reusable UI components?
Show the answer
Answer: a · Class selectors have lower specificity, making their styles easier to override and promoting reusability.
The card explicitly states that ID selectors' "high specificity makes them difficult to override and reduces reusability," while recommending class selectors for "reusable components." Option C is true but does not explain the core reason for preference in terms of styling management.
Read the full bite: CSS Selectors: How to Target HTML for Styling
Question 16 of 30
What is the primary function of the `create-vite` tool?
Show the answer
Answer: c · To generate a new web application project with a chosen framework and pre-configured Vite setup.
The card describes `create-vite` as a "project wizard or a blueprint generator" for "creating new projects from scratch." It explicitly states that it is not for adding Vite to an existing project, which makes option A incorrect.
Read the full bite: Scaffolding a Vite Project with `create-vite`
Question 17 of 30
What is the primary function of the `ng new` command in Angular development?
Show the answer
Answer: d · To set up a complete, ready-to-run Angular application from scratch.
The `ng new` command is designed to initialize a brand new Angular project, providing a complete, runnable application with a standard structure and dependencies. Adding features to an existing project is typically done with `ng generate`.
Read the full bite: ng new: Your Angular Project Starter Kit
Question 18 of 30
What is the correct sequence of commands to initialize a new SvelteKit project and start its development server?
Show the answer
Answer: b · npx sv create my-app, then cd my-app, then npm install, then npm run dev
The card explicitly states the process: first create the project with npx sv create, then navigate into the directory with cd, install dependencies with npm install, and finally start the server with npm run dev. Option A is a common mistake because it omits the crucial npm install step, which the card identifies as a 'footgun'.
Question 19 of 30
What is the critical reason for wrapping Vite's HMR API calls within an if (import.meta.hot) block?
Show the answer
Answer: b · To prevent runtime errors in the production build where import.meta.hot is undefined.
The card states that forgetting this wrapper will 'crash your production build' because 'import.meta.hot is undefined' in production. Option A describes the function of hot.accept(), not the purpose of the conditional check itself.
Read the full bite: Vite's HMR API: Manually Controlling Hot Reloads
Question 20 of 30
What is the main drawback of adding your own variables and functions directly to the window object?
Show the answer
Answer: b · It increases the risk of naming conflicts and makes your code fragile.
The card states that adding variables directly to the window object "makes your code fragile and can lead to conflicts with third-party scripts." This 'global scope pollution' is the primary concern, not memory, security, or module prevention.
Read the full bite: The `window` Object: Your Browser's Global Scope
Question 21 of 30
Which scenario best highlights the primary advantage of using HSL color values in CSS?
Show the answer
Answer: a · When programmatically adjusting color properties like lightness for hover states.
HSL (Hue, Saturation, Lightness) is ideal for programmatic color manipulation, allowing developers to easily create variations like lighter or darker shades. The other options describe the primary use cases for keywords, hexadecimal values, and RGB values, respectively.
Read the full bite: CSS Color Values: From Keywords to Functions
Question 22 of 30
Which task is NOT primarily handled by the `document` object in JavaScript?
Show the answer
Answer: d · Redirecting the browser to a different web address.
The `document` object is for interacting with the page's content and structure, such as modifying elements, creating new ones, or finding existing elements. Navigating to a new URL is a browser-level action handled by the `window.location` object, not the `document` object.
Question 23 of 30
In which scenario would using the CSS font shorthand property be ill-advised?
Show the answer
Answer: a · When you only want to modify font-weight without affecting other inherited font styles.
The card explicitly states to avoid using the font shorthand when only changing a single property, as it would reset other inherited font styles to their initial values. Options A and C describe recommended use cases for the shorthand, while option D describes its primary function, not a reason to avoid it.
Read the full bite: CSS `font`: The All-in-One Typography Shorthand
Question 24 of 30
When JavaScript modifies an element using the DOM, what is the immediate and primary outcome?
Show the answer
Answer: a · The browser's visual rendering of the webpage is updated for the user.
The DOM is the browser's live, in-memory model of the webpage, so changes made via JavaScript directly update what the user sees. These changes do not affect the original HTML file on the server, which remains unchanged.
Read the full bite: The DOM: Your HTML as a Live Object Tree
Question 25 of 30
Which scenario is the most appropriate use case for sessionStorage?
Show the answer
Answer: a · Temporarily saving progress on a multi-page form within a single browser tab.
sessionStorage is ideal for temporary data tied to a single tab, such as partially filled form data that should persist across page refreshes but not after the tab closes. Storing sensitive data like authentication tokens is explicitly advised against for any Web Storage, and large datasets are better handled by IndexedDB.
Read the full bite: Web Storage API: Browser Key-Value Stores
Question 26 of 30
When should you generally avoid using the CSS `background` shorthand property?
Show the answer
Answer: b · When you only intend to modify one specific background property of an already styled element.
The `background` shorthand resets all unspecified background properties to their default values. Therefore, using it to change only one property on an existing background will inadvertently remove or reset other previously set properties. Options A, B, and D describe scenarios where the shorthand is efficient and recommended.
Read the full bite: CSS `background`: The All-in-One Shorthand
Question 27 of 30
Given the CSS declaration border-radius: 10px 20px;, which corners will receive a 20px radius?
Show the answer
Answer: d · Top-right and bottom-left
The card states that with two values, the first value applies to the top-left and bottom-right corners, while the second value applies to the top-right and bottom-left corners. Therefore, 20px will be applied to the top-right and bottom-left corners. Option B describes the application of the 10px value.
Read the full bite: border-radius: More Than Just Rounded Corners
Question 28 of 30
Which statement accurately describes a fundamental principle of using props in Vue components?
Show the answer
Answer: b · A child component must never directly mutate a prop it receives from its parent.
The card explicitly states that a critical rule is to 'never mutate a prop directly inside the child component,' emphasizing the one-way data flow principle. Options A and B describe incorrect data flow patterns, while option C suggests a less robust declaration method than recommended.
Read the full bite: Vue Component Props: Passing Data Downstream
Question 29 of 30
Which statement accurately describes data passed to an Angular component using the input() function?
Show the answer
Answer: d · The child component receives a read-only signal, preventing it from directly modifying the data.
The card explicitly states that the `input()` function returns a "read-only signal" and that "the child cannot modify its own input." This enforces a one-way data flow from parent to child, making options suggesting two-way binding or child modification incorrect.
Read the full bite: Angular's input() Function: Passing Data to Components
Question 30 of 30
What happens if a Svelte component uses `let myProp;` instead of `export let myProp;` when intending to receive data from its parent?
Show the answer
Answer: a · The `myProp` variable will remain private to the component and will not receive data from the parent.
Declaring `let myProp;` without `export` makes the variable private to the component, preventing it from receiving data passed as a prop from a parent. The card explicitly calls this a 'footgun' where the component silently fails to receive data, rather than throwing an error or inferring the prop.
Read the full bite: Svelte Props: Passing Data with `export let`
Could you explain these out loud?
That is what an interview actually tests. Tezvyn gives you questions like these with what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.