Mastering JavaScript: Prototypal Inheritance & Async Concepts

JavaScript is indeed a very wierd language. Maybe because it was developed in just 10 days to add dynamic behaviour to otherwise static HTML pages. The deeper you dive into JavaScript, the wierder it becomes. 1. Higher Order Functions -> Functions can be passed as arguments and returned from other functions. 2. Closures -> The inner function still remembers its neighbouring variables even after the outer function completes execution. 3. Callbacks -> A function can be passed as an argument to another function, to be executed later (usually after some async operation completes). 4. Callback Hell -> If multiple such callbacks are nested together, you are stuck in this 'Pyramid of Doom' 5. Promises -> An object which represents the current state of an asynchronous operation that can be returned from async functions to avoid the callback hell while chaining sequential async steps. 6. async / await -> More elegant way to make asynchronous code look and feel synchronous, but still make it non-blocking. And honestly we have not even started OOPS in JavaScript. The so called 'Prototypal Inheritance' and the binding of 'this' keyword which is the most confusing part of JS makes this language very difficult to master. But the good news is that you dont have to study everything. Instead you have to study just enough concepts to get the work done. For front end frameworks like React and Vue.js just the functional programming concepts mentioned earlier is sufficient. Take a look at this video where Keerti Purswani from Educosys explains these concepts in the most simplest of ways. It really helped me set my basics right. https://lnkd.in/gJWgMQf2 Here is the link to my GitHub repo where you can find code which I did while following the tutorial. https://lnkd.in/gzSacyg5 #ReactJS #VueJS #Angular #NextJS #JavaScript #JS

To view or add a comment, sign in

Explore content categories