JS Guide
HomeQuestionsSearchResources
Search

Built for developers preparing for JavaScript, React & TypeScript interviews.

ResourcesQuestionsSupport
HomeQuestionsSearchProgress
HomeQuestionsjavascript

javascript

Core JavaScript concepts, ES6+, and language fundamentals

Your Progress

0 of 6 completed

0%

6 Questions

senior Level
1
Explain JavaScript's prototype chain and how inheritance works.
senior
prototypes
JavaScript uses prototypal inheritance where objects inherit directly from other objects through a prototype chain. Each object has an internal [[Prototype]] link that forms a chain used for property lookup until null is reached.
2
What are Generators in JavaScript and when would you use them?
senior
generators
Generators are functions that can pause execution and resume later, yielding multiple values over time. They're defined with function* syntax and return an iterator. Use cases include lazy evaluation, infinite sequences, and custom iterables.
3
What are Proxies in JavaScript and how can they be used?
senior
metaprogramming
A Proxy wraps an object and intercepts fundamental operations (get, set, delete, etc.) through handler traps. They enable metaprogramming patterns like validation, logging, lazy loading, and implementing reactive systems.
4
How does JavaScript garbage collection work and how can you prevent memory leaks?
senior
memory
JavaScript uses automatic garbage collection with a mark-and-sweep algorithm. Objects are collected when unreachable from roots (global, stack). Memory leaks occur from uncleared references like closures, event listeners, intervals, and DOM references.
5
Explain the Module pattern and how ES6 modules differ from CommonJS.
senior
patterns
The Module pattern encapsulates code using closures to create private state. ES6 modules are the standard with static imports (analyzed at compile time), while CommonJS uses dynamic require() at runtime. ES6 supports tree-shaking and async loading.
6
What is CORS, when do CORS errors occur, and how can they be resolved?
senior
web-apis
CORS (Cross-Origin Resource Sharing) is a browser security mechanism that blocks cross-origin requests unless the server explicitly allows them via HTTP headers like Access-Control-Allow-Origin.