Core JS cross interview #2
- What are some ways to create objects in JavaScript? Is there a difference what approach to choose?
- How can you use built-in object methods like
Object.keys(), Object.entries() or Object.assign()?
- What are property descriptors in JavaScript objects and how can you manipulate them?
- What are static methods in JavaScript? Provide an example.
- How do getter and setter methods work in JavaScript objects?
- Explain the concept of closure in JavaScript. Can you provide an example of a JavaScript function that uses closure to manipulate an object property?
- How can you clone an object in JavaScript?
- How can you loop through the object properties?
- What is object destructuring and how does it make handling objects more efficient?
- How can you prevent modifications to an object in JavaScript?
- What is the difference between
Object.create() and new keyword for creating objects?
- Explain the difference between function declarations, function expressions, and arrow functions.
- What is a rest operator and how can it be used in functions?
- Rest operator vs
arguments.
- How do default parameters work in JavaScript functions and why are they useful?
- How does the
this keyword work in different types of functions?
- What are the
call, apply, and bind methods? Provide examples of how and when you would use each.
- Explain recursion in JavaScript.
- What are IIFEs (Immediately Invoked Function Expressions) and why might they be used?
- What are
Maps in JavaScript, and how do they relate to objects?
- What are
WeakMaps in JavaScript, and how do they relate to objects?
- How do you differentiate between enumerable and non-enumerable properties in an object, and why might this distinction be important?
- How can JavaScript functions be used as first-class citizens, and what are the advantages of this feature?
- What is callback?
- Explain the concept of method chaining. How is it implemented and what are its benefits?
- What is a higher-order function and can you provide a compelling use case involving an object?
- Describe how you might implement memoization in JavaScript.
- What is function currying and how can it be implemented in JavaScript to handle multiple arguments across different calls? Provide an example.
- How does
use strict mode affect this behavior in functions?
- What is hash data structure?