How to Remove an Object's Property in JavaScript Without Mutation

Hiiiiiii there, today I will be sharing a useful JavaScript Tip which you can use to avoid Mutation when dealing with objects. To mutate something is to change it; it is to alter its form. Deleting an Object’s property is Mutation Say you have a user object defined like this: const user = { firstName: 'John', lastName: 'Obajeti', gender: 'Male', password: 'safest' } Assuming you need to send this object as part of an API Response, you will want to remove the password field. You can do this by using the delete keyword: ...

March 11, 2022

From Web 1.0 to Web 3.0: A Brief History of the Evolution of the Web

If you have been in the tech space for some time, you must have probably heard about Web 3.0 and how it’s different and ‘better’ than Web 2.0. But if you are just interested in downloading memes on the internet and doing your work, you might wonder what the hell everyone is talking about. In a previous article, I explained how the protocol that powers the Web has evolved. In this article, I will be providing an overview of the evolution of the Web itself. ...

March 10, 2022

Why Do We Need Strict Mode in JavaScript?

If you have been in the Web Tech space for some time, you are most likely familiar with the banter JavaScript gets. It seems to be the most ‘mocked’ programming language yet a lot of people use it. The reason for this banter is not far-fetched, in many ways JavaScript can be surprising. Some actions that will break programs in other programming languages will run successfully in JavaScript. For example, every programming language has reserved words that should not be used as variable names and should not be overridden. An example is the undefined keyword in JavaScript, it’s a reserved keyword but the following code snippet will run without error in JavaScript: ...

March 9, 2022

JS Tip: How to Shuffle An Array in JavaScript

Hi there, today I will be sharing a tip on shuffling an array in JavaScript. The algorithm we will come up with can actually be implemented in any programming language but I will be doing it in JavaScript. Input Say we are given an array of a primitive type in JavaScript e.g [1, 3, 4, 5, 6, 2] or ["Tom", "Jerry", "Parker", "Wick"] Output The output is an array that contains the same elements as the first array but the order of those elements have been randomized ...

March 8, 2022

A Brief History of HTTP for Web Developers

Let me tell you a secret. I have been interacting with the web for a very long time and I am still fascinated by it today. I used to be just a consumer of the web but now I build things for it too and it’s even more fascinating. How does it work? How can a website visit a URL and then display a web page? Since computers understand only ones and zeros, how then is it possible to upload my pictures and graphics on Instagram? ...

March 7, 2022

JavaScript Prototypes in Plain English

*Cover Image by Jozef Mikulcik from Pixabay * One of the concepts in JavaScript that beginners find hard to wrap their heads around is prototypes, especially for Programmers coming from a class-based programming language. You might ask “Doesn’t modern JavaScript have the class keyword?” Yes, it does, but it’s just ‘sugar’ over prototypes, and understanding how prototypes work can save you a lot of stress when debugging JavaScript code. JavaScript is weird but understanding it makes it less weird in my opinion (if you trust that my opinion matters :) ) ...

October 22, 2021

Understanding Mixins: From Ice Cream Stands to TypeScript

When Steve Herell opened his first Ice Cream store, instead of having pre-mixed flavors, he had his staff mix freshly made ice cream with candy or other confections based on the customer requests. Those candy additions were called mix-ins. Steve probably only wanted to beat the competition, he didn’t know that his mix-in would find its way into Computer Programming Languages years later, though not literally - we don’t conjure ice creams with code yet. Do we, is there something you people are hiding from me? ...

January 23, 2021

What is Serverless?

Whenever an application is built, it must be made available to users. Consider Facebook, which was created by Mark Zuckerburg in his Harvard dorm room - we wouldn’t have known about Facebook if he didn’t make it available for other people to use. In the traditional approach, an application developer pays a Hosting Company some amount of money to rent servers. He then deploys his app unto this server and every year or month, he has to pay renewal fees to the Hosting company, whether anyone uses his application or not. ...

August 28, 2020

Avoiding Prop Drilling in React Without Context API or Redux

Prop Drilling is the process by which you pass data from one part of the React Component tree to another by going through other parts that do not need the data but only help in passing it around. Imagine someone living in Lagos, Nigeria placing an order on Amazon for a package. The package will have to go through many hands - it has to be flown by air to Nigeria, transported to the Lagos, moved from place to place until it gets into the hands of the buyer. At each stage, Amazon employs the services of people that do not ‘care’ about the product, they only help to ‘pass’ it to the person who really cared - the buyer. ...

August 8, 2020

Understanding Javascript Execution Context, Call Stack and Stack Overflow

JavaScript is weird. It is possible to use JavaScript without fully understanding JavaScript , and most times JavaScript lets you get away with it. If you are an aspiring JavaScript ninja like me, then you will definitely want to understand JavaScript . This will help you debug your code better and understand how your code works. In this post, I present an awesomely simple explanation of the JavaScript Execution Context and the Call Stack. By the end of this post, you will have a mental model that helps you understand these concepts. ...

February 1, 2020