JAVASCRIPT, NODE.
JS BASED INTERVIEW QUESTIONS
1. JavaScript Core Concepts
What is hoisting in JavaScript?
What are closures and how do they work?
Explain event delegation in JavaScript.
What is the difference between var, let, and const?
What is the difference between == and === in JavaScript?
What is the difference between null and undefined?
Explain call(), apply(), and bind() methods.
What are promises in JavaScript, and how do they work?
What is the difference between synchronous and asynchronous programming?
What are async/await, and how do they work?
What are higher-order functions in JavaScript?
What are arrow functions, and how do they differ from regular functions?
What is the difference between deep copy and shallow copy in JavaScript?
What is the difference between spread operator (...) and rest parameter (...)?
How does debouncing and throttling work in JavaScript?
2. JavaScript Data Structures & Algorithms
Explain how JavaScript arrays are implemented internally.
How does the splice() method work in JavaScript?
How do you implement a stack and queue using JavaScript?
How do you remove duplicates from an array in JavaScript?
Implement merge sort, quicksort, and bubble sort in JavaScript.
How do you find the largest and smallest number in an array?
How do you reverse a string in JavaScript?
How do you find the first non-repeating character in a string?
Implement a binary search algorithm in JavaScript.
How do you flatten a deeply nested array in JavaScript?
3. JavaScript Object-Oriented Programming (OOP)
What is prototypal inheritance in JavaScript?
How do you create a class in JavaScript?
What is the difference between ES5 function constructors and ES6 classes?
How do you achieve inheritance in JavaScript?
What is the difference between [Link]() and class-based inheritance?
What is the difference between shallow copy and deep copy when copying objects?
4. JavaScript DOM & Browser APIs
What is the DOM, and how does it work?
What is the difference between [Link]() and
[Link]()?
How do you add, remove, and modify elements in the DOM?
What is event bubbling and event capturing?
How does localStorage, sessionStorage, and cookies work?
What are Web Workers, and how are they used?
How do you optimize a website for better performance in JavaScript?
5. JavaScript ES6+ Features
What are template literals, and how are they useful?
What are default parameters in JavaScript functions?
What is destructuring assignment, and how does it work?
Explain the use of Map and Set in JavaScript.
What are symbols in JavaScript?
What is the purpose of generators and iterators?
6. Asynchronous JavaScript & APIs
What is the difference between callbacks and promises?
How does async/await simplify asynchronous programming?
What is the difference between fetch API and XMLHttpRequest?
How do you handle errors in async/await?
What are WebSockets, and how are they different from HTTP requests?
7. [Link] Basics
What is [Link], and how does it work?
What are the advantages of using [Link]?
Explain the event-driven architecture of [Link].
What is the [Link] event loop, and how does it work?
What is the difference between setImmediate(), [Link](), and setTimeout()?
What are streams in [Link], and how do they work?
What is the difference between CommonJS and ES modules in [Link]?
8. [Link] File System & Modules
How do you read and write files in [Link]?
How do you create a custom module in [Link]?
What are built-in modules in [Link]?
How does require() work in [Link]?
What is path module, and how does it help in file operations?
9. [Link] & Backend Development
What is [Link], and why is it used?
What is the difference between GET and POST requests?
How do you handle middleware in Express?
What is CORS, and how do you enable it in [Link]?
How do you connect a database (MongoDB, PostgreSQL) with [Link]?
What is the purpose of middleware in [Link]?
How do you implement JWT-based authentication in [Link]?
What is the difference between session-based and token-based authentication?
How do you handle error handling in [Link]?
10. [Link] Database & ORM
What is the difference between SQL and NoSQL databases?
How do you use Mongoose with MongoDB in [Link]?
What are ACID properties in databases?
What is Sequelize, and how does it work with PostgreSQL?
How do you handle database migrations in [Link]?
11. [Link] Performance & Security
How do you optimize [Link] performance?
What is the purpose of clustering in [Link]?
How do you prevent SQL injection and XSS attacks in [Link] applications?
What are Rate Limiting and CSRF protection in [Link]?
What is the difference between bcrypt and JWT for authentication?
How do you use Redis for caching in a [Link] application?
12. [Link] Testing & Deployment
How do you write unit tests in [Link] using Jest/Mocha?
What is test-driven development (TDD) in [Link]?
How do you deploy a [Link] app on AWS, Heroku, or Vercel?
What is PM2, and how does it help in managing [Link] processes?
How do you handle logging in a [Link] application?
13. JavaScript & [Link] Coding Challenges
1. Implement a debounce function in JavaScript.
2. Implement a custom Promise in JavaScript.
3. Implement a throttling function in JavaScript.
4. Reverse a string without using built-in methods.
5. Write a middleware function in [Link] to log requests.
6. Implement a simple REST API using [Link].
7. Implement a JWT authentication system.
8. Implement a real-time chat application using WebSockets and [Link].
9. Implement a rate limiter in [Link].
10. Implement an API that handles file uploads in [Link].