Top 30 Easy Vue, Angular & Svelte Concepts Quiz for Beginners
30 easy multiple-choice Vue, Angular & Svelte concept questions, the vocabulary and first principles, the parts you need before anything else makes sense. They come from 30 bites in the Vue, Angular & Svelte library, the gentlest slice of the 160 Vue, Angular & Svelte 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.
Vue 3, Nuxt, Angular, Svelte, SvelteKit
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 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 3 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 4 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 5 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 6 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 7 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 8 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 9 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 10 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 11 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`
Question 12 of 30
What is the primary purpose of using a custom event ($emit) in a Vue component?
Show the answer
Answer: c · To allow a child component to send data or signals to its direct parent.
The card explicitly states that custom events provide a "dedicated channel for child-to-parent communication" and that "events only travel one level up to the direct parent." Option A is wrong because the card advises against using $emit for sibling communication.
Read the full bite: Vue Custom Events: Child-to-Parent Communication
Question 13 of 30
How does an Angular child component typically notify its immediate parent about an internal event, such as a button click?
Show the answer
Answer: d · By using an @Output() property initialized with EventEmitter and calling its emit() method.
The @Output() decorator, paired with an EventEmitter and its emit() method, is the canonical Angular pattern for a child component to send events and data upwards to its immediate parent. Option B describes a pattern for communication between distant components, not the immediate parent. Options B and D are not the standard or recommended Angular approaches for this specific child-to-parent event notification.
Read the full bite: Angular @Output(): Child Components Reporting Up
Question 14 of 30
For a component that needs frequent toggling of its visibility, like a dropdown menu, which Vue directive is most appropriate?
Show the answer
Answer: c · v-show
v-show is ideal for frequent toggling because it keeps the element in the DOM and only changes its CSS display property, making subsequent toggles very cheap. Using v-if would incur higher performance costs by repeatedly adding and removing the element from the DOM.
Read the full bite: Vue's v-if vs. v-show: When to Use Which
Question 15 of 30
What is the fundamental difference in how Angular's *ngIf directive and the [hidden] property affect an HTML element?
Show the answer
Answer: b · *ngIf completely removes the element from the DOM, while [hidden] keeps it in the DOM but applies CSS to hide it.
The card explicitly states that *ngIf='false' "completely removes it from the DOM," while [hidden] is used "to hide an element but keep it in the DOM." Option C is incorrect because *ngIf does not use CSS to hide; it manipulates the DOM directly.
Read the full bite: Angular Structural Directives: Shape Your DOM
Question 16 of 30
For a standard text input element, which underlying property binding and event listener pair does Vue's v-model typically abstract?
Show the answer
Answer: c · v-bind:value and @input
The card states that for text inputs, v-model becomes :value and @input, binding the input's value and listening for immediate changes. Option D is a common distractor because @change is used for some form elements, but @input is specific to text inputs for real-time updates.
Read the full bite: Vue's v-model: Two-Way Binding Made Simple
Question 17 of 30
What is a crucial requirement for correctly registering Vue lifecycle hooks?
Show the answer
Answer: c · They must be called synchronously during the component's setup phase.
The card explicitly states that "hooks must be registered synchronously during setup, not in an async callback" to ensure Vue can properly associate them with the component instance. Option B is incorrect because the card warns against using arrow functions for hooks in the Options API as it loses the 'this' context.
Read the full bite: Vue Lifecycle Hooks: Running Code at the Right Time
Question 18 of 30
A component needs to fetch data from an API using an ID received via an @Input() property. Which lifecycle hook is the most appropriate for this initial data fetch?
Show the answer
Answer: c · The ngOnInit hook
The card explicitly states that ngOnInit is for 'one-time initialization logic that depends on component inputs, like fetching data from an API based on an ID passed into the component.' The constructor is incorrect because input properties are not yet assigned their values at that stage.
Question 19 of 30
What is the consequence of returning a cleanup function from an asynchronous onMount callback in Svelte 5?
Show the answer
Answer: a · The cleanup function will not be registered, leading to potential memory leaks upon component destruction.
An asynchronous onMount callback implicitly returns a Promise, not the cleanup function itself. Therefore, Svelte cannot register the intended cleanup function, which can lead to memory leaks. Option B is incorrect because the Promise is not interpreted as a cleanup function.
Read the full bite: Svelte Lifecycle: Mount, Destroy, and Tick
Question 20 of 30
What is a critical limitation of Svelte's `$: ` reactive assignments?
Show the answer
Answer: a · They only track direct variable dependencies, not changes within functions called.
The card explicitly states that the compiler only tracks direct dependencies and not those hidden inside function calls, which is a key limitation. The card also provides `$: console.log(count)` as an example of using it for side effects, making option B incorrect.
Read the full bite: Svelte's Reactive Assignments with `$: `
Question 21 of 30
Which statement accurately describes how Vue's scoped CSS ensures styles are applied only to a specific component?
Show the answer
Answer: c · It modifies CSS selectors to target unique data attributes added to the component's elements.
Vue's scoped CSS works by adding a unique data attribute to all elements within the component and then rewriting CSS selectors to include this attribute. This mechanism ensures styles are strictly applied only to elements within that specific component. The card explicitly states that Vue achieves this 'not with native Shadow DOM', making that option incorrect.
Question 22 of 30
What is the primary mechanism Svelte uses to ensure that styles defined within one component's <style> block do not unintentionally affect other components?
Show the answer
Answer: c · It generates a unique hash and applies it as a class to elements, then modifies CSS selectors to target only those hashed classes.
Svelte achieves style scoping by generating a unique hash for each component, applying it as a class to the component's elements, and then modifying the CSS selectors to target these specific hashed classes. This prevents styles from leaking, unlike Shadow DOM (option D) which is a different encapsulation method.
Read the full bite: Svelte Scoped Styles: CSS That Can't Leak
Question 23 of 30
How does Angular primarily achieve style isolation for components by default?
Show the answer
Answer: a · By adding unique attributes to component elements and modifying CSS selectors to include them.
Angular's default ViewEncapsulation (Emulated) works by adding unique attributes to a component's HTML elements and then rewriting the component's CSS rules to target only those elements with the specific attribute. Option B is incorrect because while Shadow DOM is a ViewEncapsulation mode, it is not the default; Angular 'fakes' it by default.
Read the full bite: Angular Component Styles: Scoped by Default
Question 24 of 30
When is it most appropriate to use Angular Template-Driven Forms?
Show the answer
Answer: c · When building simple forms with a fixed structure, such as a login or contact form.
Template-Driven Forms are explicitly recommended for small, simple forms with a fixed structure like login or contact forms, as they keep logic co-located with the view. Complex or dynamic form scenarios, extensive programmatic control, and advanced testing are better handled by Reactive Forms.
Read the full bite: Angular Template-Driven Forms: Logic in the HTML
Question 25 of 30
For which scenario is defineModel() in a Vue component most appropriate?
Show the answer
Answer: d · To create a custom form input that directly updates a parent's bound data.
defineModel() is designed to simplify two-way binding for custom form inputs, allowing a child component to directly update the parent's data. Option A describes the explicit one-way data flow pattern that defineModel() simplifies for two-way binding.
Read the full bite: Component v-model: Two-Way Binding with defineModel
Question 26 of 30
Which validation scenario would typically require a custom validator rather than a built-in Angular validator?
Show the answer
Answer: a · Validating that a password input matches its 'Confirm Password' counterpart.
The card explicitly states that built-in validators are not suited for complex, multi-field validation like comparing two password fields, which would require a custom validator. The other options are all handled by specific built-in validators (minLength, requiredTrue, and email, respectively).
Question 27 of 30
When would a developer typically choose not to implement Vuex in a Vue.js application?
Show the answer
Answer: a · The application is a brand new project being developed today.
The card explicitly states that "for any new Vue project, the official recommendation is to use Pinia instead," making it the primary reason to avoid Vuex in new development. While Vuex is overkill for small applications (Option C), the recommendation for Pinia applies regardless of size for new projects. Options C and D describe scenarios where Vuex would typically be beneficial.
Read the full bite: Vuex: A Central Store for Your App's State
Question 28 of 30
What is the primary benefit of using an Angular Service for state management in a typical application?
Show the answer
Answer: a · It ensures a single, consistent source of truth for shared data across different components.
The card states that a service acts as a 'dedicated data manager' and 'single source of truth' for shared data, ensuring consistency across components. Option B is incorrect because the card explicitly mentions that services are not suitable for complex features like undo/redo, which require dedicated state management libraries.
Read the full bite: Using Angular Services for Simple State Management
Question 29 of 30
When using Angular's HttpClient, what action is necessary to initiate the actual network request to the server?
Show the answer
Answer: c · Subscribing to the Observable returned by an HttpClient method
The card explicitly states that 'The HTTP request is only dispatched when you call .subscribe() on that Observable.' Calling methods like http.get() merely returns a 'cold' Observable, which does not send the request until subscribed to.
Read the full bite: Angular HttpClient: Your App's API Connector
Question 30 of 30
Which scenario is not an appropriate use case for a SvelteKit load function defined in +page.js?
Show the answer
Answer: b · Retrieving user-specific profile data that requires private credentials.
The card explicitly states that +page.js runs on both the server and the client, making it unsuitable for operations requiring private credentials or direct database access due to potential exposure. Fetching public data for SSR and client-side navigation is a primary use case.
Read the full bite: SvelteKit's `load` Function: Pre-fetch Data for Pages
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.