The document contains a comprehensive list of questions covering HTML, CSS, JavaScript, and React, aimed at assessing knowledge and understanding of web development concepts. It includes topics such as HTML semantics, CSS properties, JavaScript functions, and React components and hooks. Each section addresses fundamental and advanced aspects of these technologies, making it a valuable resource for learners and professionals alike.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
3 views17 pages
MERN stack Interview Questions
The document contains a comprehensive list of questions covering HTML, CSS, JavaScript, and React, aimed at assessing knowledge and understanding of web development concepts. It includes topics such as HTML semantics, CSS properties, JavaScript functions, and React components and hooks. Each section addresses fundamental and advanced aspects of these technologies, making it a valuable resource for learners and professionals alike.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17
HTML Questions
1. What is the purpose of Doctype in HTML?
2. What is semantic HTML? 3. What is the difference between div element and span element? 4. What is the difference between <b> and <strong> tags in HTML? 5. What is the purpose of the alt attribute in HTML? 6. What are void elements in HTML? 7. What are some of the advantages of HTML5 over its previous versions? 8. What is the difference between HTML form's "action" and "method" attributes? 9. What is the purpose of the <meta> tag in HTML? 10. What is the purpose of the viewport meta tag? 11. What is the purpose of the <noscript> tag in HTML? 12. what is the difference between HTML tag and HTML element? IMPORTANT 13. What will happen if we don't put <!Doctype HTML> tag? 14. What is the use of "target" attribute in HTML? 15. What is the purpose of <header> tag? 16. What is the purpose of the "data-*" attribute in HTML? 17. What are HTML entities? 18. What is the purpose of the <picture> element in HTML5, and how is it used to optimize images? 19. What are HTML ARIA attributes? 20. What is the purpose of <nav>, <main>, <article>,<section>,<aside>,<footer> tag? CSS Questions 1. What are the possible ways to apply CSS styles to a web page? 2. What are some new features in CSS3? 3. What is universal selector in css? 4. Explain the difference between classes and IDs in CSS. 5. Explain box model in CSS. 6. What is the difference between margin and padding in CSS? 7. Explain the CSS display property and its values. 8. What is transition in CSS? 9. What is the difference between linear and radial gradient in CSS? 10. What is the difference between flex-grow and flex-shrink properties in Flexbox? 11. What is the difference between flex-wrap: nowrap and overflow: hidden in CSS? 12. What is the gap property in Flexbox, and how is it used to add spacing between flex items? 13. How do you center an element using flexbox? 14. What is the difference between grid-row and grid-column in CSS Grid? 15. What is the purpose of the transition-property property in CSS transitions? 16. What is the function of the transition-timing-function property in CSS transitions? 17. How do you delay the start of a CSS transition? 18. How do you apply a transition to multiple properties at once? 19. What are the properties of CSS 2D transform? 20. What is the difference between the translate() and rotate() functions? 21. What are the properties of CSS 3D transform? 22. What is the difference between RGB and RGBA colors? 23. what is css filter? 24. What is a CSS sprite? 25. What is the :not() pseudo-class used for in CSS? 26. How do you target all even or odd elements using a pseudo-selector in CSS? 27. What is the :visited pseudo-class used for in CSS? 28. ow do you target the first letter of a text element using a pseudo-selector in CSS? 29. What is the :checked pseudo-class used for in CSS? 30. What is the @media rule in CSS? 31. How do you make images responsive in CSS? 32. What is the difference between min-width and max-width in CSS media queries? 33. How do you optimize responsive images for faster loading in CSS? 34. How does calc() work in css? 35. What is specificity in CSS? 36. Which property is used to control the scrolling of an image in the background? 37. What are the potential drawbacks of using CSS frameworks such as Bootstrap? 38. What is SASS and the difference between sass and scss? 39. What are mixins in Sass? 40. What is Sass inheritance? JavaScript Questions 2. What is javascript? 3. What is the difference between null and undefined in JavaScript? 4. What is the difference between == and === in JavaScript? 5. What is the difference between let, const, and var in JavaScript? 6. How do you convert a string to a number in JavaScript? 7. What is the purpose of the array slice method? 8. What is the purpose of the array splice method? 9. What are arrow function? 10. What is the difference between slice and splice? 11. What is a pure function? 12. What is a higher order function? 13. What is hoisting? 14. What are modules in javascript? 15. What is callback in JavaScript? 16. What is a callback hell in javascript? 17. What is memoization? 18. What is the purpose of the "use strict" statement in JavaScript? 19. What is a cookie in javascript? 20. What are the differences between cookie, local storage and session storage? 21. What is AJAX? 22. What is the difference between synchronous and asynchronous code in JavaScript? 23. What are promises in JavaScript? 24. What is the difference between async/await and promises in JavaScript? 25. How do you handle errors in javascript? 26. What is NaN in javascript? 27. How do you find operating system details in javascript? 28. What is the Document Object Model (DOM)? 29. What is the difference between the DOM and HTML? 30. What is the difference between the DOMContentLoaded event and the load event? 31. What is the difference between innerHTML and innerText? 32. What is the role of the Window object in the DOM? 33. What is a DOM node in JavaScript? 34. How do you prevent default behavior of an event in the DOM using JavaScript? 35. What is event propagation? 36. What is call stack in javascript? 37. What is an event loop? 38. What is BOM? 39. What is the use of setTimeOut() in javascript? 40. What is the use of setInterval() in javascript? 41. What is the purpose of clearTimeout method and clearInterval? 42. How do you redirect new page in javascript? 43. What is a JavaScript object? 44. What is the difference between dot notation and bracket notation when accessing properties of an object? 45. What is an object literal in javascript? 46. How would you clone an object in JavaScript? 47. What is a JSON? 48. What is prototype chain? 49. How does prototypal inheritance work in JavaScript? 50. What is the difference between an object's prototype and its constructor function? 51. How do you add properties and methods to an object's prototype in JavaScript? 52. What is the difference between Object.prototype and Object.__proto__ in JavaScript? 53. How do you check if an object inherits from a specific prototype in JavaScript? 54. How do you override a method in an object's prototype in JavaScript? 55. What is the difference between Object.create() and new Object() in JavaScript? 56. What is a regular expression(regex)? 57. What is the difference between a regular expression and a string? 58. What is the syntax for creating a regular expression pattern? 59. What is the difference between the asterisk () and the plus sign (+) in regular expressions? 60. How do you use the question mark (?) in regular expressions? 61. How do you specify a range of characters in a character class? 62. What is the difference between a greedy and a non-greedy match in regular expressions? 63. How do you use the pipe (|) operator in regular expressions? 64. What is the purpose of the caret (^) and dollar sign ($) characters in regular expressions? 65. What are some common use cases for regular expressions? 66. How do you match a specific number of characters in a regular expression? 67. How do you match a specific character that has a special meaning in a regular expression 68. How do you use lookarounds in regular expressions? 69. What is the window.location object in JavaScript? 70. What are the properties of the window.location object? 71. How do you redirect to another page using JavaScript's window.location object? 72. How do you reload the current page using JavaScript's window.location object? 73. How do you get the value of a query parameter from the URL using JavaScript's window.location object? 74. How do you compare two dates in JavaScript? 75. How do you get the current timestamp in JavaScript? 76. How do you add or subtract days to a date in JavaScript? 77. what is iterator in javascript? 78. What is decorator in javascript? 79. What is optional chaining? 80. What is throttling? 81. What is babel? 82. What is debouncing? 83. What is global execution context? 84. What is function execution context? 85. What does the variable environment in JavaScript's function execution context contain, and what is its purpose? 86. What is a scope chain in JavaScript's function execution context? 87. How do I modify the url without reloading the page? 88. What are dynamic imports in javascript? 89. What paradigm is Javascript? 90. How do you empty an array? 91. What is a lambda function? 92. What is variable shadowing in javascript? 93. How do you assign default values to variables? 94. What is a rest operator in javascript? 95. What is a spread operator? 96. What's a typical use case for anonymous functions? 97. What is the difference between a prototype and an instance? 98. What is a function expression? 99. What is the difference between a module and a library? 100. How are JavaScript and ECMA Script related? 101. What are the different ways to delete a variable in JavaScript? 102. What are the different types of errors in JavaScript? 103. What is the use of the blur function? 104. What is the difference between an alert box and a confirmation box? 105. What is prompt() in javascript? 106. When to Use Internal and External JavaScript Code? 107. What is npm? 108. What is the name of the file which npm uses to identify the project and its dependencies? 109. What is the difference between dependencies and devDependencies? 110. What is a non-blocking function? 111. What is a blocking function? 112. What is Function Composition? 113. What is heap? 114. What is typed array in javascript? 115. What is nodejs? 116. What is a PWA? 117. What is nullish coalescing operator (??)? 118. How do you get the status of a checkbox with javascript? 119. What is the purpose of double tilde operator? 120. What are the different ways to debug JavaScript code? 121. What is the difference between undeclared & undefined? 122. What would be the result of 2+5+”3″? 123. What is statically typed and dynamically typed language and is javascript a statically typed or a dynamically typed language? 124. What is function currying? 125. What does delete do in JavaScript? 126. How does control flow function in js play a role in asynchronous operation in javascript? 127. How can you share code between files? 128. What does the instanceof operator do? React Questions 1. What is ReactJS? 2. What are the key features of ReactJS? 3. What is the difference between ReactJS and other JavaScript frameworks/libraries? 4. What is JSX in ReactJS? 5. Explain the concept of virtual DOM in ReactJS. 6. What are the components in ReactJS? 7. What is the significance of state in ReactJS? 8. What is the difference between props and state? 9. What is the purpose of the "render" method in ReactJS? 10. What are the lifecycle methods in ReactJS and how do they work? 11. What is a higher-order component (HOC) in ReactJS? 12. What is the purpose of the "key" prop in ReactJS? 13. Explain the concept of controlled and uncontrolled components in ReactJS. 14. What is the purpose of the "setState" method in ReactJS and how does it work? 15. What is the significance of the "React.Fragment" component? 16. How does React handle event handling? 17. What are the differences between class components and functional components in ReactJS? 18. How can you optimize the performance of React applications? 19. What is React Router and how does it work? 20. Explain the concept of React Hooks and their benefits. 21. Can web browsers read JSX directly? 22. “In React, everything is a component.” Explain. 23. Why is it necessary to start component names with a capital letter? 24. When do we prefer to use a class component over a function component? 25. How do you handle forms in React? 26. Explain the Flux architectural pattern. 27. Explain the concept of context in React. How does it work? 28. What are portals in React? When would you use them? 29. Explain the concept of lazy loading in React. 30. What is useEffect hook? 31. What is the role of the useReducer hook in React? How does it differ from the useState hook? 32. Describe the purpose of the useRef hook. 33. What is the purpose of the useMemo hook? How does it help optimize performance in React? 34. When would you use the useCallback hook in React? How does it differ from the useMemo hook? 35. What happens when you call setState? 36. What is children prop in React? 37. What is the impact of indexes as keys? 38. How can we avoid prop drilling? 39. How would you prevent a component from rendering in React? 40. What do these three dots (...) in React do? 41. Why React uses className over class attribute? 42. Why we should not update state directly? 43. What's wrong with using Context in React? 44. Does React re-render all components and sub components every time setState is called? 45. Explain why and when would you use useMemo()? 46. When shall we use useReducer hook in ReactJS? 47. How does React renderer work exactly when we call setState? 48. what are styled component? 49. What are the advantages of styled components? 50. Why props cannot be updated in ReactJS? 51. What is a dispatcher? 52. What are Default Props? 53. What are inline conditional expressions? 54. What are the differences between React and React Native? 56. Is React a library or a Framework and why? 57. What are nested component in react? 58. Can a nested child component access the state of its sibling component? 59. What are error boundaries in react? 60. What is React Dev Tool? 61. What is "React Node" in react? 62. Why do we need to React Router? 63. Explain the role of Reducer. 64. What is the use of React.cloneElement? 65. Can you explain React's "lifting state up" concept and why it is important? 66. What is a ref in React and what is its purpose? 67. How does using refs differ from traditional DOM manipulation? 68. What is the main difference between "string refs" and "callback refs" in React. 69. Explain the concept of "forwarding refs" in React. 70. How do refs affect the component lifecycle in React? 71. What are the benefits of using callback refs over string refs? 72. Can we use refs with functional components in React? If yes, how? 73. What are the limitations or caveats of using refs in React? 74. How do you clean up or release the resources associated with a ref in React? 75. How do you access the DOM node using refs in React? 76. What is the difference between Element and Component in React? 77. How to apply validation on props in React? 78. Why is a React component declarative? 79. What is ReactDOM package? 80. how is React different from Angular? 81. Explain the use of CSS modules in React. 82. Can you explain what custom hooks are in React and how they differ from regular hooks? 83. What are the benefits of using custom hooks in React? Can you provide an example of a scenario where a custom hook would be useful? 84. How do you create a custom hook in React? 85. Are there any limitations or considerations when using custom hooks in React? Are there any performance implications or potential pitfalls that developers should be aware of? 86. What is Formik, and why would you use it in a React application? 87. What are the advantages of using Formik over traditional form handling in React? 88. What is Axios, and what problem does it solve in JavaScript or React development? 89. What are the advantages of using Axios over the built-in fetch API in JavaScript? 90. What is Material-UI, and what is its purpose in React development? 92. What is render hijacking in react? 93. What are Keyed Fragments? 94. What is suspense component? 95. Is it possible to use react without JSX? 96. Why does strict mode render twice in React? 97. What is React Fiber? 98. How does React Fiber improve the overall performance of React applications? 99. What is Babel in React js? 100. What is a wrapper component in react? 101. Explain DOM diffing? 102. What are the dependencies in the dependency array of the useEffect hook? How do they affect the behavior of the hook? 103. What are some common use cases for the useEffect hook? 104. Can you explain the concept of multiple useEffect hooks in a single component? How do they interact with each other? 105. What is the purpose of the cleanup function returned by the useEffect hook? How can you utilize it effectively? 106. What are the potential pitfalls or common mistakes when using the useEffect hook? How can you avoid them? 107. What is server-side rendering (SSR) in React.js? 108. Why would you choose to use server-side rendering instead of client-side rendering in React.js? 109. How does server-side rendering differ from client-side rendering in React.js? 110. Explain the benefits and drawbacks of server-side rendering in React.js. 111. What are the performance implications of server-side rendering in React.js? 113. How can you implement server-side rendering with React.js without using frameworks like Next.js? 114. Describe the steps involved in setting up server-side rendering with React.js from scratch. 115. What libraries or tools can be used to perform server-side rendering with React.js? 116. How can you handle data fetching and asynchronous operations during server-side rendering in React.js? 117. What considerations should you keep in mind when implementing server-side rendering for a large-scale React.js application? 118. Can you explain the concept of code splitting and how it relates to server-side rendering in React.js? 119. How can you optimize server-side rendered React.js applications for search engine optimization (SEO)? 120. What are some common challenges or pitfalls associated with server-side rendering in React.js, and how can you address them? 121. How does server-side rendering impact the development and debugging process compared to client-side rendering? 122. Can you explain the concept of hydration in the context of server-side rendering in React.js? 123. What are the best practices for organizing and structuring a React application? 124. How do you handle authentication and authorization in React applications? 125. What are the pros and cons of using React in a project compared to other JavaScript frameworks? 126. Why do we need Nextjs? 127. What are some of the challenges you have faced working with React? Node.js Questions 1. When are background or worker processes useful? 2. Why is NodeJS Single threaded? 3. Explain chaining in Nodejs? 4. What are streams in Nodejs Explain the different types of streams present in Nodejs? 5. Explain the concept of URL module? 6. Explain the concept of middleware in Nodejs? 7. Explain libuv? 8. Explain the usage of a buffer class in Nodejs? 9. How does Nodejs handle the child threads? 10. what is cryptography in Nodejs? 11. What are buffer objects in nodejs? 12. How can we spawn the child process asynchronously without blocking the Nodejs event loop? 13. How can we take advantage of multi-core system in Nodejs as nodejs works on single thread? 14. Can node js perform cryptographic functions? 15. How can we read or write files in node js? 16. Which are the global objects in Node JS? 17. How can we perform asynchronous network API in Node JS? 18. What are the utilities of OS module in NodeJS? 19. What Is The Difference Between Nodejs AJAX And JQuery? 20. What Is EventEmitter In NodeJs? 21. What Is A Child_process Module In NodeJs? 22. Explain the concept of middleware in Express.js. ? 23. What is the purpose of the app.use() function? 24. How do you retrieve the URL parameters from a GET request in Express.js? 25. Discuss the difference between app.get() and app.post() in Express.js. ? 26. Explain the use of next() in Express.js middleware. ? 27. What is the role of the express.Router class? 28. How do you handle 404 errors in Express.js? 29. What are the differences between req.query and req.params? 30. Describe the purpose of req.body and how you would access it. ? 31. Explain Error handling in express ? MongoDB Questions 1. How does MongoDB differ from relational databases? 2. What is a Document in MongoDB? 3. How is data stored in collections in MongoDB? 4. Describe what a MongoDB database is. 5. What is the default port on which MongoDB listens? 6. What are indexes in MongoDB, and why are they used? 7. What is the role of the id field in MongoDB documents? 8. How do you create a new MongoDB collection? 9. Describe how to insert read update delete data from a MongoDB collection. 10. What do you understand by NoSQL databases? Explain. 11. Does Mongodb Support Foreign Key Constraints? 12. What is BSON in MongoDB? 13. What is sharding? 14. What does MongoDB not being ACID compliant really mean? 15. How can you achieve primary key - foreign key relationships in MongoDB? 16. How can you achieve transaction and locking in MongoDB? 17. What is Aggregation in MongoDB? 18. How to query MongoDB with “like”? 19. How does MongoDB ensure high availability? 20. Is MongoDB schema-less? 21. Should I normalize my data before storing it in MongoDB? 22. Why is a covered query important? 23. Does MongoDB provide a facility to do text searches? How? 24. At what interval does MongoDB write updates to the disk? 25. How do I perform the SQL JOIN equivalent in MongoDB? 26. What is a Storage Engine in MongoDB 27. How does MongoDB provide concurrency? 28. What is splitting in mongodb? 29. How to remove a field completely from a MongoDB document? 30. How to condense large volumes of data in Mongo? 31. When to Redis or MongoDB? 32. MongoDB relationships. What to use - embed or reference? 33. How to find MongoDB records where array field is not empty? 34. Explain what is horizontal scalability?