Nullish Coalescing (??) vs Logical OR (||) Operator in TypeScript

TypeScript Null Coalese operator

In TypeScript, there are two operators that can be used for handling default values: the nullish coalescing operator (??) and the logical OR operator (||). While they may seem similar at first glance, they have key differences in their behavior. In this tutorial, we’ll learn about the nullish coalescing operator and the logical OR operator … Read more >>

TypeScript Record vs Object Explained with Real Examples

TypeScript Record vs Object

While working on a TypeScript project, you want to store some data, like a list of user roles and their permissions. Now you are not sure whether to use a Record or a normal Object. This can be confusing for many developers. Knowing the difference between Record and Object will help you choose the right … Read more >>

Conditionally Add Property to Object in TypeScript

Add property to dynamic form in TypeScript

When working with TypeScript applications, especially in real-world scenarios like dynamic forms or conditional configurations, there are times when you need to build objects based on user input or business logic. For example, I encountered this while developing a property management app for a client, where not every listing had a garage, pool, or parking … Read more >>

TypeScript Enums vs Types Explained with Examples

TypeScript Enums vs Types Explained with Examples

While building a TypeScript project, you may need to define a set of constant values, like user roles, status codes, or payment methods. At this point, you might wonder: Should I use an Enum or a Type alias? This is a common question for both beginners and experienced developers. TypeScript provides several ways to define … Read more >>

Require vs Import in TypeScript

Require vs Import in TypeScript

In TypeScript, module loading is a fundamental concept. With the advent of ECMAScript 2015 (ES6), the import statement was introduced as a modern alternative to the traditional require function used in Node.js. In this blog, we will discuss a detailed comparison between require and import, their usage in TypeScript, and practical examples to help you … Read more >>

TypeScript: Check If a Key Exists in a Object

Check if Key Exist in TypeScript Object

While working on a TypeScript project, you receive data from an API as an object. Before using any property from that object, you want to make sure the key actually exists to avoid errors. For example, you want to display the user’s email, but you’re not sure if the email key is present in the … Read more >>

Convert TypeScript Objects to JSON

Converting TypeScript Objects to JSON

While creating TypeScript-based web apps, you’ll often need to convert objects into JSON for sending data to APIs, saving it in local storage, or logging structured output. Although JSON.stringify usually works fine, it can be difficult when your objects have dates, functions, or special types. In this tutorial, we’ll learn how to convert TypeScript objects … Read more >>

How to Iterate Over Objects in TypeScript?

Object Iteration in Typescript form data

Recently, while working on a TypeScript form, I needed to go through form fields that had different keys each time. The form wasn’t fixed, so I needed a flexible way to handle the data, but I still wanted to use TypeScript’s type safety. In this short tutorial, I’ll show you how to use Object.entries() to … Read more >>

How to Check Types in TypeScript?

Check invalid type in Typescript

When working on a large-scale TypeScript project, I got some runtime errors, all due to incorrect type usage. TypeScript adds static types to JavaScript, but just using it isn’t enough; you need to understand how its type-checking features work to catch bugs early and write safer code. In this tutorial, I’ll explain the different ways … Read more >>

51 Python Programs

51 PYTHON PROGRAMS PDF FREE

Download a FREE PDF (112 Pages) Containing 51 Useful Python Programs.

pyython developer roadmap

Aspiring to be a Python developer?

Download a FREE PDF on how to become a Python developer.

Let’s be friends

Be the first to know about sales and special discounts.