🟨
JavaScript
Advanced JavaScript interview questions covering core concepts, ES6+, async programming, performance optimization, and modern development practices
80 Total Questions
6 Easy
48 Medium
26 Hard
Q1Medium
Explain the difference between var, let, and const in terms of hoisting, scope, and temporal dead zone.
variablesscopehoistingtemporal-dead-zone
Q2Medium
What are closures and how do they work in memory? Provide a practical example.
closuresscopememoryfunctions
Q3Medium
Explain event bubbling, capturing, and how to stop event propagation.
eventsDOMbubblingcapturing
Q4Easy
What's the difference between == and === operators? Explain type coercion rules.
comparisonoperatorstype-coercion
Q5Medium
Explain Promises, async/await, and error handling in asynchronous JavaScript.
promisesasync-awaitasynchronouserror-handling
Q6Hard
What is the JavaScript Event Loop and how does it handle asynchronous operations?
event-loopasynchronouscall-stackmicrotasks
Q7Hard
Explain prototypal inheritance and how it differs from classical inheritance.
prototypesinheritanceobjects__proto__
Q8Medium
What are the different ways to create objects in JavaScript?
objectsconstructorsclassesobject-creation
Q9Hard
Explain the 'this' keyword and its different binding rules.
thisbindingcontextarrow-functions
Q10Medium
What are Map and Set in ES6? How do they differ from Objects and Arrays?
mapsetes6data-structures
Q11Hard
Explain WeakMap and WeakSet. When would you use them?
weakmapweaksetmemory-managementgarbage-collection
Q12Medium
What are Symbols in JavaScript and what are their use cases?
symbolsprimitivespropertiesmeta-programming
Q13Hard
Explain generators and iterators in JavaScript with practical examples.
generatorsiteratorsyieldlazy-evaluation
Q14Hard
What is the Proxy API and how can it be used for meta-programming?
proxymeta-programminghandlerstraps
Q15Hard
Explain the Reflect API and its relationship with Proxy.
reflectproxymeta-programmingapi
Q16Medium
What are ES6 modules and how do they differ from CommonJS?
moduleses6commonjsimport-export
Q17Medium
Explain destructuring assignment and its various use cases.
destructuringarraysobjectsassignment
Q18Medium
What are template literals and tagged template literals?
template-literalsstringsinterpolationtagged-templates
Q19Medium
Explain arrow functions and their differences from regular functions.
arrow-functionsthislexical-bindingfunctions
Q20Medium
What is function currying and how do you implement it?
curryingfunctional-programmingpartial-applicationbind
Q21Medium
Explain call, apply, and bind methods with examples.
callapplybindthisfunction-methods
Q22Hard
What is the difference between setTimeout, setImmediate, and process.nextTick?
timersevent-loopnodejsasynchronous
Q23Hard
Explain how JavaScript engines optimize code execution (JIT compilation).
jitoptimizationv8compilation
Q24Hard
What are memory leaks in JavaScript and how do you prevent them?
memory-leaksgarbage-collectionperformancedebugging
Q25Medium
Explain the difference between deep and shallow copying of objects.
copyingobjectsreferencescloning
Q26Medium
What is the purpose of Object.freeze(), Object.seal(), and Object.preventExtensions()?
immutabilityobject-methodsfreezeseal
Q27Medium
Explain the concept of hoisting in JavaScript with var, let, const, and functions.
hoistingvariablesfunctionstemporal-dead-zone
Q28Medium
What are the different ways to handle errors in JavaScript?
error-handlingtry-catchpromisesasync
Q29Hard
Explain the difference between synchronous and asynchronous iteration.
iterationasync-iterationgeneratorsstreams
Q30Medium
What is the AbortController and how is it used for canceling operations?
abort-controllercancellationfetchcleanup
Q31Hard
Explain Worker threads and their use cases in JavaScript.
web-workersthreadsparallel-processingperformance
Q32Medium
What are BigInt and how do they solve JavaScript's number limitations?
bigintnumbersprecisionintegers
Q33Medium
Explain the nullish coalescing operator (??) and optional chaining (?.).
nullish-coalescingoptional-chainingoperatorssafety
Q34Easy
What is the difference between Object.keys(), Object.values(), and Object.entries()?
object-methodsenumerationkeysvalues
Q35Medium
Explain the concept of function composition and provide implementation examples.
compositionfunctional-programminghigher-order-functionsreduce
Q36Medium
What are private fields and methods in JavaScript classes?
classesprivate-fieldsencapsulationmethods
Q37Medium
Explain the performance implications of different loop types in JavaScript.
performanceloopsiterationoptimization
Q38Medium
What is the Intl API and how is it used for internationalization?
intlinternationalizationlocalizationformatting
Q39Medium
Explain memoization and implement a memoization function.
memoizationcachingperformanceoptimization
Q40Medium
What are the different types of scope in JavaScript?
scopeglobalfunctionblocklexical
Q41Medium
Explain the concept of pure functions and their benefits.
pure-functionsfunctional-programmingside-effectspredictability
Q42Easy
What is the difference between slice() and splice() array methods?
arraysslicesplicemethods
Q43Medium
Explain the concept of debouncing and throttling with implementation.
debouncingthrottlingperformanceevents
Q44Easy
What are the different ways to check if a property exists in an object?
objectspropertieshasOwnPropertyin-operator
Q45Hard
Explain the concept of monkey patching and its implications.
monkey-patchingprototypesmodificationglobal-state
Q46Hard
What is the purpose of Object.defineProperty() and property descriptors?
property-descriptorsdefinePropertygetterssetters
Q47Medium
Explain the difference between function declarations and function expressions.
functionsdeclarationsexpressionshoisting
Q48Easy
What are the different ways to convert a string to a number in JavaScript?
type-conversionstringsnumbersparsing
Q49Medium
Explain the concept of lazy loading and how to implement it.
lazy-loadingperformancedynamic-importsoptimization
Q50Hard
What is the difference between microtasks and macrotasks in the event loop?
event-loopmicrotasksmacrotaskspromises
Q51Hard
Explain the concept of tree shaking and how it works with ES6 modules.
tree-shakingmodulesbundlingoptimization
Q52Medium
What are higher-order functions and provide practical examples.
higher-order-functionsfunctional-programmingcallbacksdecorators
Q53Medium
Explain the concept of immutability and how to achieve it in JavaScript.
immutabilityfunctional-programmingstate-managementperformance
Q54Hard
What is the purpose of the new.target meta-property?
new.targetconstructorsmeta-propertyclasses
Q55Medium
Explain the difference between Object.create() and the constructor pattern.
object-createconstructorsprototypesinheritance
Q56Medium
What are property getters and setters, and how do you implement them?
getterssetterspropertiesaccessors
Q57Hard
Explain the concept of lexical scoping and closure chains.
lexical-scopingclosuresscope-chainnested-functions
Q58Hard
What is the Proxy object and how is it used?
proxymeta-programminginterceptorsreflection
Q59Hard
Explain the concept of tail recursion and its optimization.
tail-recursionoptimizationstackperformance
Q60Medium
What are Web Workers and how do they enable parallel processing?
web-workersparallel-processingthreadsperformance
Q61Medium
Explain the difference between shallow and deep copying.
shallow-copydeep-copyobject-cloningreference-types
Q62Medium
What is the Module pattern and how does it provide encapsulation?
module-patternencapsulationclosuresnamespace
Q63Hard
Explain the concept of function currying and partial application.
curryingpartial-applicationfunctional-programminghigher-order-functions
Q64Medium
What are Symbols and their use cases in JavaScript?
symbolsprimitive-typesunique-identifiersobject-properties
Q65Medium
Explain the concept of memoization and its implementation.
memoizationoptimizationcachingperformance
Q66Medium
What is the difference between call(), apply(), and bind()?
callapplybindfunction-context
Q67Hard
Explain the concept of prototypal inheritance in depth.
prototypal-inheritanceprototype-chaininheritanceobjects
Q68Hard
What are WeakMap and WeakSet, and when to use them?
weakmapweaksetgarbage-collectionmemory-management
Q69Hard
Explain the concept of generator functions and iterators.
generatorsiteratorsyieldlazy-evaluation
Q70Medium
What is the Temporal Dead Zone in JavaScript?
temporal-dead-zonehoistinglet-constvariable-declaration
Q71Hard
Explain the concept of functional composition.
functional-compositionfunctional-programminghigher-order-functionsreusability
Q72Medium
What are the different ways to create objects in JavaScript?
object-creationconstructorsobject-literalclasses
Q73Medium
Explain the concept of event delegation and its benefits.
event-delegationevent-bubblingdom-eventsperformance
Q74Easy
What is the difference between synchronous and asynchronous programming?
synchronousasynchronouscallbackspromises
Q75Medium
Explain the concept of debouncing and throttling.
debouncingthrottlingperformanceevent-optimization
Q76Medium
What are the different types of errors in JavaScript?
error-typeserror-handlingdebuggingexceptions
Q77Medium
Explain the concept of polyfills and transpilation.
polyfillstranspilationbabelbrowser-compatibility
Q78Medium
What is the difference between Map and Object in JavaScript?
mapobjectdata-structuresperformance
Q79Medium
Explain the concept of lazy loading and code splitting.
lazy-loadingcode-splittingperformancedynamic-imports
Q80Hard
What are the best practices for JavaScript performance optimization?
performance-optimizationbest-practicesmemory-managementprofiling