Lets Encapsulate : Designing an ATMIn this article we would cover one of the fundamental concept of OOP, Encapsulation. Encapsulation is the practice of bundling the data (variables) and methods (functions) that operate on the data into a single unit, or class, and restricting access ...Jul 8, 2024路2 min read
Do you need a constructor every time you implement prototypal inheritance ?馃馃挱Jun 1, 2024路1 min read
What is Prototype chain ?In our previous article we saw what is prototype inheritance. If you haven't read about it , do have a look at it. https://breakthecode.hashnode.dev/how-does-prototype-delegation-inheritance-work Let's look at the same example. The ability of the o...May 31, 2024路1 min read
How does prototype delegation / inheritance work ?Let us look at the following code snippet: //constructor function const Employee = function (empId, empName) { //instance properties this.empId = empId; this.empName = empName; }; This is a basic constructor , now what if I want to add a method ...May 30, 2024路2 min read
What exactly is the JS Runtime ?JS runtime is an environment to enable the execution of JS code. Depending on where the Javascript code is running (server-side / web-browser) there would be additional environment specific features in the runtime. For eg : In a browser runtime ther...May 28, 2024路1 min read
How does the JIT compilation of Javascript work ?1.Parsing - code is parsed into a data structure - Abstract Syntax Tree 2.Compilation - Code is compiled into machine code (0s and 1s) 3.Execution - Code is directly executed after compilation (Just in time) in the JS engine's call stack 4.Optimizati...May 27, 2024路1 min read