- Published on
Common JavaScript Interview Topics
Common JavaScript Interview Topics
-
- Variables (var, let, const)
- Data types (string, number, boolean, object, array)
- Operators (arithmetic, comparison, logical)
- Control flow (if-else statements, switch statements, loops)
-
- Function declaration vs. function expression
- Arrow functions
- Scope and closures
- Callback functions
- Higher-order functions
-
- Objects and prototypes
- Constructors and classes
- Inheritance and prototype chain
- Encapsulation, abstraction, polymorphism
-
- Callbacks
- Promises
- async/await
- Event loop
-
- Selecting elements
- Modifying elements
- Creating and removing elements
- Event handling
-
- Try-catch blocks
- Error objects
- Handling asynchronous errors
-
- CommonJS vs. ES6 modules
- Module.exports and import/export syntax
-
- Local storage
- Fetch API
- History API
- Geolocation API
-
- Destructuring
- Spread/rest operators
- Template literals
- Default parameters
- Sets and Maps
-
Testing
- Unit testing with frameworks like Jest, Mocha, or Jasmine
- Test runners like Karma
- Testing libraries like Enzyme or React Testing Library
-
Frameworks and Libraries
- React.js
- Angular
- Vue.js
- Express.js
- Node.js
-
Security
- Cross-site scripting (XSS)
- Cross-site request forgery (CSRF)
- Content Security Policy (CSP)
- Authentication and authorization
-
- Minification and bundling
- Lazy loading
- Debouncing and throttling
- Code splitting
-
- Immutability
- Pure functions
- Map, filter, reduce
-
Data Structures and Algorithms
- Arrays, stacks, queues, linked lists
- Searching and sorting algorithms
- Big O notation and algorithmic complexity