Meta JavaScript Interview Questions 2026

Published July 22, 2026 · Updated July 22, 2026

5 real JavaScript interview questions asked at Meta. Upvoted by engineers who cleared the loop. Covers Technical rounds.

5 questions
220 engineers asked
308 upvotes
Company: Meta
Technology: JavaScript

All JavaScript Questions Asked at Meta

Meta Hard Technical round ReactJavaScript

Explain how React's virtual DOM diffing algorithm (reconciliation) works. Why is it O(n) instead of O(n3)? What are the assumptions it makes and when do those break down (causing performance issues)?

↑ 56 upvotes · 34 engineers asked this · SDE2
Meta Medium Technical round PythonJavaJavaScript

Given an array of N integers, find the maximum product subarray. Explain why you need to track both the maximum and minimum product ending at each position, and handle zeros and negative numbers.

↑ 52 upvotes · 33 engineers asked this · SDE1
Meta Medium Technical round 4–6 YearsReactJavaScript

What is the difference between useMemo and useCallback? Give concrete examples of when each actually helps vs. when it hurts.

↑ 107 upvotes · 84 engineers asked this · Full Stack Developer
Meta Hard Technical round 3-7 yearsReactJavaScript

A news feed component re-fetches and re-renders every item whenever a single like count changes. Walk through how you would restructure state so only the affected item re-renders, without introducing a global state library.

↑ 52 upvotes · 31 engineers asked this · Senior SDE
Meta Medium Technical round 1-4 yearsJavaScript

Explain the output order of this code and why: console.log(1); setTimeout(()=>console.log(2),0); Promise.resolve().then(()=>console.log(3)); console.log(4);

↑ 41 upvotes · 38 engineers asked this · Senior SDE

Practice these questions with AI feedback

Get instant grading on your answers, identify your weak areas, and generate a personalised 14-day study plan — all free.

Build my study plan →

More Meta Questions

Meta Distributed Systems Questions Meta Kafka Questions Meta Java Questions Meta Python Questions

JavaScript Questions at Other Companies

Accenture JavaScript Questions Capgemini JavaScript Questions

Browse by company

Amazon Google Microsoft Flipkart Swiggy Meta Apple Netflix Uber Airbnb Stripe Razorpay PhonePe Paytm Zomato Salesforce Oracle Adobe LinkedIn Atlassian Accenture Deloitte Wipro Infosys TCS Capgemini PayU General Anthropic OpenAI TikTok JPMorgan Walmart Spotify DoorDash Goldman Sachs Revolut Canva Capital One Lyft SAP Siemens Shopify Grab Cognizant LTIMindtree Myntra Hotstar Twitter Snowflake

Frequently asked questions

Explain how React's virtual DOM diffing algorithm (reconciliation) works. Why is it O(n) instead of O(n3)? What are the assumptions it makes and when do those break down (causing performance issues)?
Explain how React's virtual DOM diffing algorithm (reconciliation) works. Why is it O(n) instead of O(n3)? What are the assumptions it makes and when do those break down (causing performance issues)?
Given an array of N integers, find the maximum product subarray. Explain why you need to track both the maximum and minimum product ending at each position, and handle zeros and negative numbers.
Given an array of N integers, find the maximum product subarray. Explain why you need to track both the maximum and minimum product ending at each position, and handle zeros and negative numbers.
What is the difference between useMemo and useCallback? Give concrete examples of when each actually helps vs. when it hurts.
What is the difference between useMemo and useCallback? Give concrete examples of when each actually helps vs. when it hurts.
A news feed component re-fetches and re-renders every item whenever a single like count changes. Walk through how you would restructure state so only the affected item re-renders, without introducing a global state library.
A news feed component re-fetches and re-renders every item whenever a single like count changes. Walk through how you would restructure state so only the affected item re-renders, without introducing a global state library.
Explain the output order of this code and why: console.log(1); setTimeout(()=>console.log(2),0); Promise.resolve().then(()=>console.log(3)); console.log(4);
Explain the output order of this code and why: console.log(1); setTimeout(()=>console.log(2),0); Promise.resolve().then(()=>console.log(3)); console.log(4);