https://github.com/ganqqwerty/123-Essential-JavaScript-Interview-Questions https://github.com/rohan-paul/Awesome-JavaScript-Interviews/tree/master

Polyfills

https://github.com/mohitkumartoshniwal/javascript-interview-preparation/tree/main/polyfills

30th Aug

  • delete only works if you delete property from object
  • delete can remove array elements and make them undefined: delete arr[3]
  • Function expressions are not hoisted
foo() // fails
var foo = function() {
	// something
}
  • Singleton design pattern
  • Deep clone and shallow clone implementation
  • Detect undefined object property
    • Use in operator
var obj = {
    name: 'kk',
    age: undefined
};
console.log("age" in obj); // true
console.log("aged" in obj); // false
  • check NaN using isNaN()
  • Object hasOwnProperty check if you want to iterate over the properties of an object using in operator
  • create a non-enumerable object property
  • temporal dead zone
  • pure function
  • sparse and dense arrays
  • Flux architecture in reactjs