Tag: objects

Recent Post

How to Remove Duplicate Objects from an Array

When deciding which method to choose, object type should be taken into account.

Natively deep copy a JavaScript object or array with structuredClone()

structuredClone() is a new native solution for deep copying JavaScript data objects.

How to check if a property exists in a JavaScript object

Learn methods for searching an object and its prototype for the existence of properties.

How to get the length of an object in JavaScript

Unlike arrays and strings, objects don't have a length property to query.

How to sort an array of objects by the value of a property in JavaScript

Learn how to sort an array of objects by the value of a property.

Print the contents of a JavaScript object to the DOM

Printing a JavaScript object to the DOM is harder than you might think.

Check if a value is an object in JavaScript

How to create a conditional that checks if a value is a pure object in JavaScript.

The spread operator (the three dots of JavaScript) and its uses

The spread operator lists the contents of an iterable in a comma-separated list.

From JavaScript object or array to variables with destructuring assignment

Efficiently store property values and array elements in variables.

The right way to clone an object in JavaScript

We investigate how to make a proper 'deep clone' of an object in JavaScript.