A dive into what arrow functions are, how they are different from regular functions, as well as the lexical scope and their shorthands.

Image for post
Image for post

ES2015 (or ES6) has added arrow function expressions to JavaScript. These functions have shorter syntax than their predecessor (this being the function expressions) and they are roughly the equivalent of lambda functions in Python or blocks in Ruby. Arrow functions are anonymous functions with a special syntax that accept arguments and operate in the context of their enclosing scope. They provide two main benefits over regular functions; first, their syntax is more concise, and second, managing this in arrow functions is easier.

In this article, I will discuss the differences between the syntax of function expressions, function declarations and arrow functions, lexical scope, arrow functions as object methods, and some shorthands for using them. …


Image for post
Image for post

Since the release of ES2016 (aka ES6), many new features for working with arrays and objects have been made available to the developers. In this article, I am going to explain destructuring, rest parameters, and spread syntax. The aim is to describe these features in depth so that you’ll be able to work with arrays and objects much more quickly and compactly.

Destructuring

Destructuring assignment allows assigning the properties of an Array or Object to multiple variables at once. There are two types of restructuring; object destructuring and array destructuring.

Object Destructuring

Object destructuring binds variables to different properties of an object. Let’s have a look at an object with the traditional approach to creating variables and assign values to them. …


An overview of React’s upcoming release v17.

Image for post
Image for post

React v17 is coming 2.5 years after the release of v16. The React 16 version included many new features including hooks, contexts, error handling, portals, and more. React 17 will not include new features, however, but it does include important changes and improvements to the library itself. These changes give us insight into what the React team is planning for future updates (meaning that they are taking time to make the platform stable and easier to upgrade).

Previously, the React team’s upgrades used to take an all-or-nothing approach, meaning that if you wanted to upgrade React then you had to upgrade everything. In the upcoming version of React, they have changed how it works. React 17 will allow us to use multiple versions at the same time. We will be able to upgrade the whole application piece by piece or at once depending upon the size and complexity of the application. …


Useful methods that can help you to debug your code with ease.

Image for post
Image for post

As a web developer, it’s necessary that you be familiar with console.log(). It is the most straightforward approach to troubleshoot anything by logging the value of variables in developer tools. But the console API is much more than that, it provides many other methods that can you help in debugging.

If you have only used console.log() and a couple of other methods for debugging, I guarantee that after reading this article you will learn new console methods that will take your JavaScript debugging to the next level.

List of all the console methods that are explained in this article:

  1. console.log
  2. console.clear…

Image for post
Image for post

Anyone who has worked on an I.T. project will know this familiar scenario: a project with a tight timeline has a bug that needs fixing before deployment. Once the code has been written, manual testing is performed before the code review is done, and the code is merged to the source control. You then run the risk that more bugs and issues may have been introduced from the code merge; meaning that you’ll either need to write more tasks to resolve this issue or the new code changes will need to be reverted in source control.

A lot of things could lead to problematic code. The following are a few main reasons for…


Image for post
Image for post

Every year, JavaScript update adds new features. This year ES2020 or ES11 was released (Read ES2020 features article), with ES2021 or ES12 expected to be released in mid-2021.

New features that are added to JavaScript each year go through a four-stage process, with the fourth stage being the last one. In this article, I will discuss the features that have already reached stage four and are added to the Google Chrome V8 engine.

List of the new features discussed in this article

  • String.prototype.replaceAll
  • Promise.any
  • Logical Operators and Assignment Expressions
  • Numeric Separators
  • Intl.ListFormat
  • dateStyle and timeStyle options for Intl.DateTimeFormat

String.prototype.replaceAll

In JavaScript, replace() method only replaces the first instance of a pattern in a string. If we want to replace all the matches of a pattern in a string, the only way to achieve that is by using global regexp. …


What are promises and what is the difference between Promise.all, Promise.allSettled, Promise.race and Promise.any?

Image for post
Image for post

Introduction

Promises in JavaScript are used to handle asynchronous operations by keeping track of whether a certain event has happened. If that certain event has taken place, it determines what happens next. Promises return a value which is either a resolved value or a reason why it’s rejected. They can handle multiple asynchronous operations easily and they provide better error handling than callbacks and events.

Callback: A callback is a function that is passed into another function as an argument to be executed later.

Events: Events provide a dynamic interface to a WebPage and are connected to elements in the Document Object Model(DOM), for example: onclick(), onmouseover() etc. …


Image for post
Image for post
Photo by bruce mars on Unsplash

As a young programmer in today’s world, it’s very important that you keep yourself up to date with the constantly changing technology landscape as a programmer needs to evolve with updates to best practices and techniques. Just as with any profession, one needs to keep working on themselves and gathering new knowledge to provide the best solution possible. In this article, you will learn about how to be the best version of a developer that you can be.

Good Work Ethics

If you want to succeed in your career then you will need to invest in yourself and your skills. Adding one extra hour of self-development work to your day will give you a huge edge over others. In this sense, the extra time you put in can be thought of as an investment in yourself and you career. …


Image for post
Image for post
Photo by Michael Geiger on Unsplash

A website is an application that you can access and browse on your device through a web browser. It has two main components running in the background: a web server and a database. A web server is a machine that stores, processes, and delivers web pages as and when requisitioned by the user. A database is a structured collection of data that is stored on the webserver and used by the web application. The web server is connected to the internet and has an IP address that can be accessed by an attacker to exploit any vulnerabilities. …


Image for post
Image for post

While working on a project recently, I had to containerize a NodeJs Windows application. I was surprised to find that there was no single official image for the NodeJs Windows container on Docker Hub so I decided to create one. This process inspired me to put together a step by step guide on how to build a lightweight NodeJs Windows container using the Windows Nano Server. Please note that we chose to create this for a Windows Nano Server due to its optimized small size.

Pre-Requisites

  • Windows 10 or Windows 2016 server
  • Docker installed and switched to Windows containers
  • Hyper-V turned on to run Windows…

About

Taran

I am a Full stack developer. I enjoy learning and building new skills, and sharing what I’ve learned.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store