JavaScript

All About Javascript

How to remove null and falsy in JavaScript array

We will learn to How to remove null and falsy in JavaScript array with code examples. “In JavaScript, a truthy value is a value that is considered true when encountered in a Boolean context. All values are truthy unless they are defined as falsy. That is, all values are truthy except false, 0, -0, 0n, “”, null, undefined, and NaN.” 1. Boolean Constructor to remove null and false in JavaScript string array The …

How to remove null and falsy in JavaScript array Read More »

Array.of() in JavaScript ES6

In this post, we are going to understand Array.of() in JavaScript ES6 with examples. “The Array.of() method creates a new  Array constructor from a variable number of arguments, regardless of the number or type of the arguments. The main difference between Array.of() and the Array constructor is in the handling of integer arguments: Array.of(9) creates an array with …

Array.of() in JavaScript ES6 Read More »