Skip to main content
NEW
New questions added!
Explore now
frontendpro
en
Sign in
Pricing
Get full access
en
Sign in
frontendpro
Dashboard
Courses
Interview guides
Practice
All practice questions
Coding challenges
React & Next.js questions
HTML & CSS questions
All quizzes
Technical articles
About FrontendPro
Quiz
New to interviews? Try the
easy quizzes
.
Default
Title
Difficulty
Coding
System design
Quiz
JavaScript
React
105
quizzes
210
minutes est.
0
completed
Filters
1
Which of the following is NOT a JavaScript primitive data type?
JavaScript
Data Types
Easy
4 options
Which operator is used to check the data type of a variable in JavaScript?
JavaScript
Type Checking
Easy
4 options
Which statement about var, let, and const is correct?
JavaScript
Variables
Easy
4 options
Which is NOT a common way to convert a string to a number in JavaScript?
JavaScript
Conversion
Easy
4 options
How do you embed an expression inside a template literal?
JavaScript
Template Literals
Easy
4 options
What does the spread operator (...) do with an array like [...arr]?
JavaScript
Spread
Easy
4 options
What is hoisting in JavaScript?
JavaScript
Hoisting
Easy
4 options
How can you best avoid problems caused by hoisting?
JavaScript
Hoisting
Easy
4 options
What is the key difference between == and === in JavaScript?
JavaScript
Equality
Easy
4 options
What is the difference between break and continue?
JavaScript
Control Flow
Easy
4 options
What is the syntax of the ternary operator?
JavaScript
Operators
Easy
4 options
Which array method gives you both the element and its index in the callback?
JavaScript
Arrays
Easy
4 options
What does the switch statement do when no case matches?
JavaScript
Control Flow
Easy
4 options
What do rest parameters (...args) do?
JavaScript
Functions
Easy
4 options
What is the difference between a parameter and an argument?
JavaScript
Functions
Easy
4 options
What is a key benefit of arrow functions in callbacks?
JavaScript
Functions
Easy
4 options
What is a callback function?
JavaScript
Callbacks
Easy
4 options
What is a typical use case for anonymous functions?
JavaScript
Anonymous Functions
Easy
4 options
When is a default parameter's value used?
JavaScript
Default Parameters
Easy
4 options
Which is NOT a standard way to create an object in JavaScript?
JavaScript
Objects
Easy
4 options
Which array method transforms each element and returns a new array?
JavaScript
Arrays
Easy
4 options
What does destructuring assignment let you do?
JavaScript
Destructuring
Easy
4 options
How can you reliably check whether an object is empty?
JavaScript
Objects
Easy
4 options
What is the key difference between synchronous and asynchronous functions?
JavaScript
Async
Easy
4 options
What are the three states of a Promise?
JavaScript
Promises
Easy
4 options
Which keywords implement inheritance in ES2015 classes?
JavaScript
Classes
Easy
4 options
What is the convention when naming a constructor function?
JavaScript
Constructors
Easy
4 options
Which are the three main types of scope in JavaScript?
JavaScript
Scope
Easy
4 options
A common way to preserve the correct `this` when passing a method as a callback is:
JavaScript
This
Easy
4 options
What is the DOM?
JavaScript
Dom
Easy
4 options
Which method creates a new element to insert into the DOM?
JavaScript
Dom
Easy
4 options
How do you attach an event listener to an element?
JavaScript
Events
Easy
4 options
In event bubbling, an event propagates:
JavaScript
Events
Easy
4 options
How do you stop an event's default action, e.g. a form submitting?
JavaScript
Events
Easy
4 options
How do you toggle a CSS class on an element in JavaScript?
JavaScript
Dom
Easy
4 options
What is the difference between the Window and Document objects?
JavaScript
Bom
Easy
4 options
What does the Fetch API's fetch() function return?
JavaScript
Fetch
Easy
4 options
Which is a popular third-party library for making API calls?
JavaScript
Api Calls
Easy
4 options
Which HTML tag shows content when JavaScript is disabled?
JavaScript
Html Js
Easy
4 options
How do you redirect the browser to a new URL in JavaScript?
JavaScript
Navigation
Easy
4 options
Why are JavaScript modules useful?
JavaScript
Modules
Easy
4 options
How do you export a single default value from an ES module?
JavaScript
Modules
Easy
4 options
Where are a JavaScript module's metadata fields (name, version, dependencies) typically defined?
JavaScript
Modules
Easy
4 options
Which are the three main categories of JavaScript errors?
JavaScript
Errors
Easy
4 options
What is the role of a try...catch block?
JavaScript
Errors
Easy
4 options
What is the difference between a Set and a Map?
JavaScript
Collections
Easy
4 options
How do you convert a Set to an array?
JavaScript
Collections
Easy
4 options
What is lazy loading?
JavaScript
Performance
Easy
4 options
What is caching used for in front-end performance?
JavaScript
Performance
Easy
4 options
Which tool provides a Performance panel and audits for analyzing JS performance?
JavaScript
Performance
Easy
4 options
Which testing type checks individual components in isolation?
JavaScript
Testing
Easy
4 options
Which is a popular JavaScript testing framework known for integration with React?
JavaScript
Testing
Easy
4 options
What are design patterns?
JavaScript
Design Patterns
Easy
4 options
Why is input validation important for security?
JavaScript
Security
Easy
4 options
Which statement pauses execution to invoke the debugger where supported?
JavaScript
Debugging
Easy
4 options
What is the standard way to share code between JavaScript files?
JavaScript
Modules
Easy
4 options
What kind of technology is React?
React
React Basics
Easy
4 options
Which statement best describes a React Element?
React
React Elements
Easy
4 options
What does JSX stand for?
React
Jsx
Easy
4 options
What is the key difference between state and props?
React
State Props
Easy
4 options
What is the purpose of the `key` prop when rendering lists?
React
Keys
Easy
4 options
Using array indices as keys is problematic mainly when the list is:
React
Keys
Easy
4 options
In a controlled component, the source of truth for a form input's value is:
React
Controlled Components
Easy
4 options
Which is a common pitfall when using React Context?
React
Context
Easy
4 options
What do hooks let you do?
React
Hooks
Easy
4 options
Where must React hooks be called?
React
Hooks Rules
Easy
4 options
When does `useEffect` run relative to the browser paint?
React
Effects
Easy
4 options
What does the updater (callback) form `setCount(c => c + 1)` guarantee?
React
Setstate
Easy
4 options
What does an empty dependency array `[]` in useEffect mean?
React
Effects
Easy
4 options
What is `useRef` primarily used for?
React
Useref
Easy
4 options
What does `useCallback` return?
React
Usecallback
Easy
4 options
What is `useMemo` used for?
React
Usememo
Easy
4 options
What does `useReducer` return?
React
Usereducer
Easy
4 options
What does the `useId` hook generate?
React
Useid
Easy
4 options
What triggers a re-render in React?
React
Rendering
Easy
4 options
What are React Fragments used for?
React
Fragments
Easy
4 options
What was `forwardRef()` historically used for?
React
Refs
Easy
4 options
What is the most idiomatic way to fully reset a component's state?
React
State Reset
Easy
4 options
Why does React recommend against mutating state directly?
React
Immutability
Easy
4 options
What do error boundaries do?
React
Error Boundaries
Easy
4 options
Which library encourages testing React components the way users interact with them?
React
Testing
Easy
4 options
What is React hydration?
React
Hydration
Easy
4 options
What do React Portals let you do?
React
Portals
Easy
4 options
Which browser extension helps inspect the React component tree?
React
Debugging
Easy
4 options
What does React Strict Mode render to the page?
React
Strict Mode
Easy
4 options
Which libraries are commonly used to localize React applications?
React
I18n
Easy
4 options
What is code splitting in a React application?
React
Code Splitting
Easy
4 options
In 2026, what should you adopt first to reduce context-driven re-renders?
React
Context Perf
Easy
4 options
What is a higher order component (HOC)?
React
Hoc
Easy
4 options
What data flow does the Flux pattern enforce?
React
Flux
Easy
4 options
In React's one-way data flow, data moves:
React
Data Flow
Easy
4 options
What does the React documentation recommend instead of hand-rolling useEffect + fetch?
React
Async Data
Easy
4 options
What is server-side rendering (SSR) in React?
React
Ssr
Easy
4 options
When does static generation (SSG) render pages?
React
Ssg
Easy
4 options
In the presentational vs container pattern, presentational components:
React
Patterns
Easy
4 options
Which is a common data-fetching pitfall in React?
React
Data Fetching Pitfalls
Easy
4 options
What is a render prop?
React
Render Props
Easy
4 options
Which is a React anti-pattern?
React
Anti Patterns
Easy
4 options
Which tool fits purely local component state?
React
State Decision
Easy
4 options
What is the composition pattern in React?
React
Composition
Easy
4 options
What is the 'virtual DOM' in React?
React
Virtual Dom
Easy
4 options
What is React Fiber?
React
Fiber
Easy
4 options
What is reconciliation in React?
React
Reconciliation
Easy
4 options
What does React Suspense let you do?
React
Suspense
Easy
4 options
What happens immediately when a useState setter is called?
React
Setstate
Easy
4 options