JavaScript

JavaScript: 6 Ways to Calculate the Sum of an Array

Updated: February 19, 2023 By: Goodman

This practical, succinct article walks you through three examples that use three different approaches to find the sum of all elements of a given array in Javascript (suppose…

JavaScript: Ways to Create New Objects from Old Objects

Updated: February 19, 2023 By: Khue

As a web developer, you are very likely to find yourself in need of creating new objects from old ones in Javascript when either developing complex projects or…

JavaScript: 2 Ways to Sort an Array of Objects by Property Value

Updated: February 19, 2023 By: Goodman

Sorting data is a common task in programming and isn’t an exception in Javascript. In this article, we will discuss how to sort an array of objects by…

4 Ways to Remove Duplicates from an Array in JavaScript

Updated: March 10, 2023 By: Goodman

When working with Javascript arrays, there are many cases where your arrays contain duplicate elements. If you want a given array to contain only unique elements, you need…

JavaScript: 5 ways to create a new array from an old array

Updated: February 19, 2023 By: Khue

There are multiple ways to create a true new array from an old array in modern Javascript (ES6 or beyond). Using the spread syntax (shallow copy) This method…

1 17 18 19