All 51 questions
What is the DOM, and how does JavaScript interact with it?
Asked in 9 of 201 interviews · last asked Sep 7 · Concept · Junior
Show answer
The DOM (Document Object Model) is a tree of objects that represents a web document. JavaScript uses DOM methods and properties to find elements and change their content, attributes, or styles. It can also add or remove elements and listen for events, such as clicks.
- DOM nodes represent parts of a document, including elements and text.
- The DOM is a browser API, not part of the JavaScript language itself.
- Changing the DOM can update the page without reloading it.
- Event listeners let JavaScript respond to user actions.
JavaScriptconst button = document.createElement('button'); button.textContent = 'Click me'; button.addEventListener('click', () => { button.textContent = 'Clicked!'; }); document.body.appendChild(button);What the interviewer checks: The interviewer is checking whether you understand how JavaScript reads, changes, and handles events on a web page.
Other ways it was asked
- “What is the DOM?”
- “What is the DOM (Document Object Model)?”
- “What is the DOM, and what is it used for in JavaScript?”
What is the virtual DOM, how does it work, and how does it differ from the real DOM?
Asked in 5 of 201 interviews · last asked Nov 6 · Concept · Junior
Show answer
The virtual DOM is a lightweight description of a user interface, kept in memory by libraries such as React. When state changes, the library compares the new description with the previous one and updates the real DOM where needed. The real DOM is the browser’s live tree of page elements, which it uses to render the page.
- Comparing old and new descriptions is part of a process called reconciliation.
- The virtual DOM does not appear on screen; the browser renders using the real DOM.
- It helps manage UI updates, but is not always faster than updating the DOM directly.
What the interviewer checks: The interviewer checks whether you understand how UI changes reach the browser and why a virtual DOM is used.
Other ways it was asked
- “What is the virtual DOM, and how is it used in frontend development?”
- “What is the virtual DOM, and how does it work?”
- “Can you explain what a virtual DOM is?”
How do React components and web components differ, and when would you choose each?
Asked in 2 of 201 interviews · last asked Oct 16 · Concept · Mid-level
Other ways it was asked
- “What is the difference between React components and web components?”
- “How do you distinguish between using React components and custom elements in your front-end projects, and what factors influence your decision?”
What is a single-page application?
Asked in 2 of 201 interviews · last asked Oct 29 · Concept · Junior
Other ways it was asked
- “What do you mean by a single-page application?”
Given an accordion parent item with child items for each accordion entry, how would you fetch the data and render it on the front end in a headless application?
Asked once · last asked Feb 9 · Scenario · Mid-level
In Next.js, when should you use the Link component, and when should you use an <a> element?
Asked once · last asked Mar 21 · Concept · Junior
Can WhatsApp be integrated into a website, and how would you connect it?
Asked once · last asked May 4 · Tooling · Mid-level
How do you select an element in the DOM using JavaScript? Which method or keyword would you use?
Asked once · last asked May 22 · Concept · Junior
How would you structure the process for building a landing page with headless WordPress and a React frontend?
Asked once · last asked Jun 4 · Scenario · Mid-level
How would you design a website's architecture to request webcam and microphone access when a user arrives?
Asked once · last asked Jul 16 · Design · Mid-level
An API returns a 200 status code, but the UI is blank. What would you check?
Asked once · last asked Jul 22 · Scenario · Mid-level
How would you pass user-entered text to an API when the user clicks an action button?
Asked once · last asked Jul 31 · Scenario · Mid-level
Other ways it was asked
- “How are you passing the input text into your API when the user types text and clicks the action button?”
How do you send user-provided input from a frontend application to a backend API?
Asked once · last asked Jul 31 · Scenario · Mid-level
In jQuery, what is the difference between .html(), .text(), and .val()?
Asked once · last asked Aug 12 · Concept · Junior
In jQuery, what is the difference between append() and before()?
Asked once · last asked Aug 12 · Concept · Junior
What are MutationObserver objects in JavaScript, and what do they do?
Asked once · last asked Aug 25 · Concept · Mid-level
What causes a click on a nested button to trigger a parent handler, and how can you prevent it?
Asked once · last asked Aug 25 · Scenario · Mid-level
How does the React component tree relate to the browser DOM tree?
Asked once · last asked Sep 3 · Concept · Mid-level
Why use React instead of directly manipulating the DOM?
Asked once · last asked Sep 3 · Concept · Mid-level
How would you handle dynamic, reactive websites where content adapts in real time to user behavior?
Asked once · last asked Sep 29 · Scenario · Mid-level
How would you use JavaScript to find containers and child elements whose content extends beyond the container?
Asked once · last asked Oct 2 · Write code · Mid-level
Can you explain event delegation?
Asked once · last asked Oct 7 · Concept · Mid-level
In an uncontrolled React component, what does it mean for the DOM to manage an input's value?
Asked once · last asked Oct 8 · Concept · Mid-level
How would you implement infinite scroll from the frontend perspective, and what parameters need to be sent to the backend API?
Asked once · last asked Oct 8 · Design · Mid-level
How would you detect when a user has scrolled 85% of the page to trigger fetching the next page in an infinite scroll implementation?
Asked once · last asked Oct 8 · Scenario · Mid-level
How can you handle a dynamic scroll threshold as new pages increase the total scrollable length in an infinite scroll implementation?
Asked once · last asked Oct 8 · Scenario · Mid-level
What is the Intersection Observer API, and how is it implemented?
Asked once · last asked Oct 8 · Concept · Mid-level
When integrating back-end APIs into your front-end projects, how do you typically manage asynchronous data fetching to ensure smooth user interactions?
Asked once · last asked Oct 16 · Scenario · Mid-level
When asynchronous data retrieval fails in a frontend application, how do you provide users with immediate feedback?
Asked once · last asked Oct 16 · Scenario · Mid-level
How do you handle localization and globalization in the frontend?
Asked once · last asked Oct 19 · Concept · Mid-level
How would you implement a homepage carousel in JavaScript?
Asked once · last asked Oct 26 · Concept · Junior
How does a browser handle API requests and callbacks?
Asked once · last asked Oct 27 · Concept · Senior
How would you use vanilla JavaScript to find an element with the ID "Tom" and change its color to red?
Asked once · last asked Nov 12 · Write code · Junior
What is the difference between how JavaScript interacts with the DOM and what EJS does?
Asked once · last asked Nov 18 · Concept · Junior
Which browser API can you use to request new products from a backend?
Asked once · last asked Nov 18 · Concept · Junior
Why is jQuery used in frontend development?
Asked once · last asked Mar 24 · Tooling · Junior
How do you retrieve the CSS properties of an element?
Asked once · last asked Apr 22 · Tooling · Junior
If you have to scroll down a page, how can you do that using JavaScript? Can you write the syntax for it?
Asked once · last asked Apr 22 · Write code · Junior
What would you pay attention to when developing a standalone carousel component?
Asked once · last asked Jul 16 · Scenario · Mid-level
How would you use keyboard key codes to restrict a text box to numeric input?
Asked once · last asked Aug 12 · Scenario · Junior
What is getElementById?
Asked once · last asked Aug 12 · Concept · Junior
What are JavaScript events?
Asked once · last asked Aug 13 · Concept · Junior
What tools or frameworks are useful for building dynamic, reactive user interfaces?
Asked once · last asked Sep 29 · Concept · Mid-level
How do you track the current page in an infinite scroll implementation?
Asked once · last asked Oct 8 · Scenario · Mid-level
What business logic or validations should be handled in the UI layer?
Asked once · last asked Oct 27 · Concept · Mid-level
Why would you use React for a frontend, and how do HTML and CSS fit into it?
Asked once · last asked Oct 29 · Concept · Junior
What is the DOM, and how does Angular interact with it?
Asked once · last asked Nov 9 · Concept · Junior
Would you directly manipulate the DOM in an Angular application?
Asked once · last asked Nov 9 · Scenario · Mid-level
What considerations determine whether a reusable stepper should render step content as HTML?
Asked once · last asked Nov 13 · Concept · Mid-level
How would you handle plain-text titles in a reusable stepper component?
Asked once · last asked Nov 13 · Concept · Mid-level
What is client-side routing, and how do protected routes work?
Asked once · last asked Nov 18 · Concept · Junior
More HTML and CSS interview questions
- All HTML and CSS interview questions
- HTML Basics and Semantic HTML Interview Questions
- CSS Fundamentals Interview Questions
- CSS Layout and Responsive Design Interview Questions
- Browser Networking, Storage, and Security Interview Questions
- Browser Rendering and Web Performance Interview Questions
How this list is made
Every question here was asked by a real interviewer in a real job interview that a candidate ran MeetAssist in. After the call, the interviewer's questions are pulled from the transcript. Practice sessions, tests, exams and anything that was not a job interview are dropped.
Questions are rewritten so they make sense on their own: names of people, employers and clients are removed, and speech-to-text mistakes are fixed. Small talk, logistics and questions about one candidate's own résumé are left out. Rephrasings of the same question are merged, and the count is the number of different interviews it came up in.
The interviews come from candidates who use MeetAssist, so they lean towards software, data and AI roles: the shares describe these interviews, not every HTML and CSS interview. Answers to the most asked questions are written and checked by an editor; a "common mistake" is shown only when reviews of real answers in these interviews show it, with the count.
201 interviews, 154 candidates, Oct 2025 to Nov 2026. Updated every month with new interviews.
Or add the Chrome extension