Posts by Samim Raja Mollick

Author Biographical Info: Not available

Declare optional function parameters in JavaScript

By Samim Raja Mollick

In this tutorial, we will learn how to declare optional function parameters in JavaScript during defining the function. The optional function parameters can be defined by assigning.... Read More

Format numbers as currency strings in JavaScript

By Samim Raja Mollick

In this tutorial, I will show you how to format numbers as currency strings in JavaScript. The currency strings represent numbers in a specific currency format. The currency symbol.... Read More

Extend an existing JavaScript array with another array, without creating a new array

By Samim Raja Mollick

This tutorial will show you how to extend an existing array with another array, without creating a new array in JavaScript. We can extend an existing array with another array in mu.... Read More

Check if a variable is an array in JavaScript

By Samim Raja Mollick

This tutorial will show you how you can check if a variable is an array or not in JavaScript. For this purpose, we will use Array.isArray method and instanceof operator. Using Arra.... Read More

Find object by key-value pair in an array of objects in JavaScript

By Samim Raja Mollick

This tutorial will show you how you can find objects by id in an array of objects in JavaScript. We will use the Array.prototype.find() method and for loop to find the object. Usin.... Read More

Add key/value pair to an object in JavaScript

By Samim Raja Mollick

This tutorial will show you how you can add key/value pair to an object in JavaScript. Here are some examples below to add key/value pair to an object. Using dot notation We can ac.... Read More

Extract value of a property as array from an array of objects in JavaScript

By Samim Raja Mollick

In this tutorial, I will show you how you can extract the value of a property as an array from an array of objects in JavaScript. We will use map() method and for loop to extract a.... Read More

Check if a key exists in an object in JavaScript

By Samim Raja Mollick

In this tutorial, we will see how to check if a key exists in an object in JavaScript. We will use hasOwnProperty() method and in operator to check if a key or property exists in a.... Read More

Related Posts