Throttling can be implemented in JavaScript using timer functions such as setTimeout or setInterval. Throttling is suitable for scenarios where you want to limit how often a function can be called, but you don’t want to miss any calls.
Debouncing in Javascript
Debouncing is a way of delaying the execution of a function until a certain amount of time has passed since the last time it was called.
Async and defer in Javascript
Async and defer are boolean attributes which can be loaded along with the script tags. They are useful for loading external scripts into your web page.
If there are multiple scripts which are dependant on each other, use defer. Defer script are executed in the order which they are defined.
If you want to load external script which is not dependant on the execution of any other scripts, use async.
Polyfills in JavaScript
A polyfill is a piece of code (usually JavaScript on the Web) used to provide modern functionality on older browsers that do not natively support it. - MDN
Write small modules that each do one thing, and assemble them into other modules that do a bigger thing. You can't get into callback hell if you don't go there. - Isaac Schlueter
Reading through JS cheatsheet - https://t.co/44WMLJXuGu
Covered following topics so far:
JavaScript Basics – JS Variables and Array Methods
Functional Programming in JavaScript – Scope, Closures, and Hoisting
Objects in JavaScript – Prototypes and "this"