This repo contains a number of JavaScript interview questions that can be used for interview prep or when vetting potential candidates.
Suggested answers along with relevant resources are posted in the answers folder.
This repo was originally forked from ajzawawi/js-interview-prep but it wasn't being maintained so redux version created.
- General Questions
- Browser & DOM
- ES6
- Functional & Asynchronous Programming
- Tricky Questions
- Best Practices & Optimization
- Algorithms & Data Structures
- CSS & UI
- React & Redux
- What is a closure?
- Is JavaScript block-scoped or function scoped?
- Is JavaScript a compiled or interpreted language?
- What is function hoisting? Provide some examples where it can be good or bad.
- What is type coercion and when is it useful or dangerous.
- What is the difference between == and ===.
- What is the difference between call, apply, and bind?
- What is the difference between encryption and hashing?
- What is object serialization and deserialization. Give examples.
- Does JavaScript use mixins?
- What is tree shaking in JavaScript?
- What is reflection? Can you give examples of reflect methods you've used in the past?
- What is a symbol in JavaScript? Is it a primitive? What's a typical use case for a symbol in ES6?
- What are the differences between window and document in the browser?
- What is a host object? How is it different from a native object?
- What is the difference between event bubbling and event capturing?
- What is browser detection? How is it different from feature detection? Give examples of when you would use them.
- What is Shadow DOM?
- How is the DOM different from BOM in JavaScript?
- What is the Temporal Dead Zone?
- Arrow functions are cool in ES6. When should you NOT use arrow functions. Name three or more cases.
- What is a trampolined function? What is it used for? Will we still need this technique with ES6?
- What is a callback?
- What is a generator?
- What is a thunk in Javascript?
- What is the event loop in Javascript? How does this differ/compare to some other languages?
- Are there any differences between a thunk and a promise?
- What is the value of
console.log(+'meow')
? Explain your answer. - What does
3 instanceof Number
evaluate to? True or false? Explain your answer. - Why is my import statement not working in the browser?
- What is the difference between an array literal and condensed arrays?
- What does it mean to "hydrate" an object in JavaScript?
- Why is eval() considered evil and dangerous?
- What is meant by 'repaint and reflow'? How does it affect your application?
- What is currying?
- What's the difference between (visibility: hidden) and (display: none)? Which is better for your website's performance?
- What are memory leaks? What are the most common leaks in your JS code?
- What are the differences between graceful degradation and progressive enhancement? Can you give examples?
Graphs, Trees and Binary Search Trees
- How can you check if a tree is a binary tree?
- What is the difference between traversing a tree breadth first and depth first?
#Contributors This repo is currently maintained by Daniel Chang Contributors: AJ Zawawi