Explain Javascript Closure To Me Like I am 5

What is a Javascript closure?
According to MDN: A closure is the combination of a function bundled together (enclosed) with references to its surrounding state (the lexical environment). In other words, a closure gives you access to an outer function’s scope from an inner function. In JavaScript, closures are created every time a function is created, at function creation time.

More …

Handling Errors with Native Fetch API

The fetch native API is very powerful and simple to use. The downside is that it will only throw an error for network errors but not for HTTP errors such as 4xx or 5xx responses.

More …

Angular Change Detection

What is one way for components to communicate in Angular? It is by using @Input and @Output. Yes we could always use a service, but in this post we will dive deeper into how does Angular know when to run its change detection when new data has been communicated.

More …

Angular Basics - Lifecycle

An Angular project is made up of many components. When the application starts up, Angular runs the bootstrap sequence to build our application for display to the users. During the time when users are using the application, users click around to navigate between different pages. Components gets created, and components gets destroyed. But are those the only two stages of the lifecycle of a Angular component?

More …

Common RxJs Maps

RxJS is mostly useful for its operators, even though the Observable is the foundation. Operators are the essential pieces that allow complex asynchronous code to be easily composed in a declarative manner. If you have worked with RxJs, you probably have used a operator or two.

In this post, I want to highlight 4 most commonly used transformation operators. Transformation operators are operators that transforms data.

More …

NPX and NPM

If you are learning how to use a new Javascript framework or library, you might see the following command npx name-of-package in the Getting Started section. You might say to yourself, wow they made a typo! Actually they did not. npx and npm are very different things, and it was meant to be used that way.

More …

JavaScript Gotchas

Javascript is usually considered a wild wild west language. There are countless memes made about how Javascript is the weird and quirky language that no one wants to touch. You can see many blog posts about it here and here.

In this post, I would like to explore some of the common gotchas of the Javascript language.

More …