Hello, dev enthusiasts! I am very excited to share the experience of day 12 of my 21-day JavaScript learning challenge under the mentorship of awesome Hitesh Choudhary at his “ChaiAurCode” YouTube channel. So, let’s get started with today’s learning! Today was quite dense with some advanced and indispensable concepts of JavaScript—one of the many topics every aspirant developer must-have.
The Call Stack in JavaScript 🧩
The first of these is the call stack. At its most basic, an interpreter such as V8 is how an interpreter like V8 keeps track of its place in a script that calls multiple functions: what function is it inside right now, and after this operation is complete how does it know what to do next and where does it get back the function that it just called. It is really very important that you must understand how the call stack works so as you can effectively debug and optimize your code.
**Classes and Constructors 🏗️
**Now we again going to revise classes and constructors. The syntax of JavaScript classes becomes more strict from ES6 and objects and inheritance are easily defined. Whereas constructors are specially defined methods for object initialization. This session further built on my knowledge to be able to define and instantiate a class, which in part made my code relatively organized and modular.
Inheritance 👨👩👧👦
Continuing with classes, we learned inheritance, which is one of the principles of object-oriented programming. It gives the ability to a class to inherit properties and methods from another class in order to achieve reusability and efficiency of the code. I liked this one; it was very informative as I saw exactly how JavaScript handles inheritance in a way that is totally different from other languages that I have used.
Static Keyword 🔧
We moved to the static keyword. This is because static methods are called using the class rather than the instance of the class. For most parts, they are used for utility functions. Learning about their usage was quite an eye-opener, for it seems to open up new ways I can structure my code.
Bind Method 🔗
The final bit of functionality for functions we learned about was the bind method. The bind method creates a new function that, when called, has its this value set to the provided value with a given sequence of arguments preceding any provided when the new function is called:. Is a powerful tool, especially when facing asynchronous code. I’ve also learned about its history and its use in the early days of the React framework.
Connect and Follow 📡
All my learnings will be documented with code here on my GitHub repository. Do not forget to see it and maybe give it star if useful! Also, connect with me on LinkedIn for more insights and updates.
Github repo:-https://github.com/Rohit-1301/21-day-Javascript/tree/main/Day12%20of%20Javascript
Linkedin:-www.linkedin.com/in/rohit-gupta-687b9829a
**Learn JavaScript with “Chai Aur Code” 🎓
**Given below is a playlist for JavaScript one ought to refer to for learning JavaScript: Hitesh Choudhary: One of the superlative tutors one can find in this subject. He really makes his point clear and shows working examples, which you can follow through.
Playlist link:-https://youtube.com/playlist?list=PLu71SKxNbfoBuX3f4EOACle2y-tRC5Q37&si=jVz1VdwKUmCBEvYT
Well, that’s it for today, people! Please look out for further updates in continuation of this thrilling journey. Happy coding! ✨💻