Classes In object-oriented programming, class types are templates for creating objects. As we justlearned that in prototypal inheritance, objects inherit properties and methods from aprototype. Classes build upon prototypal inheritance. Classes were introduced in ES6 tomimic the class data type found in Java and other object-oriented programming languages. Till now developers used constructor functions to mimic object-oriented design patterns.JavaScript does not have the class type,
Deep & shallow copying in JavaScript – part 3
Copying objects with deep copy The JSON.stringify and JSON.parse methods can be used to deep copy an object. In a deep copy, the source and target objects have different memory addresses and are not connected at all. The JSON.stringify() method will take a JavaScript object as an argument and transform it into a string. Then the JSON.parse() method will parse the JavaScript string and return
Deep and shallow copying in JavaScript – part 2
Copying objects with Shallow copy Now that we went over shallow and deep copies in part 1, let’s go over shallow copying in JavaScript. There are 3 ways to create shallow copies in JavaScript: Iteration using for key in an object Spread operator Object.assign() 1. Iteration using for key in an object In order to copy the items of an object into another object we
Understanding the call stack
What is the call stack? An understanding of the call stack will allow you to understand how execution order in JavaScript works. JavaScript is a single-threaded language; this means that it handles one task at a time. JavaScript code is executed by the JavaScript engine. Google’s V8 engine is an example of a popular JavaScript engine, there are others such as the SpiderMonkey and Rhino.
Why I wrote The JavaScript Technical Interview Guide
Pre-Launch It’s been a busy 2 days, I pre-launched the JavaScript Technical Interview Guide and have sold 50% of the early bird copies. I made an announcement on Twitter and on Reddit. So far 280 upvotes on Reddit! Anyways keep reading – the juice is down below! So far I’ve emailed subscribers once with 80 practice coding exercises from chapter 1 (The Basics) . Besides
JavaScript technical interview workbook
Introduction Hi devs especially junior devs! For the past 5 months I’ve been super focused on writing a technical interview guide for juniors who want to break into the web-development industry. Since a solid grounding in JavaScript is paramount to clearing interviews focused on web applications, I wanted to write a guide that would help junior developers learn and practice at the same time. Why?
51-100 #javascript interview questions
Writing a book with Packt
Amidst a global pandemic (Covid- 19), I will be sitting quietly like a farm mouse and write a book with a publisher called Packt. The book will be focused on JavaScript interview questions in the form of practical coding questions.