Can I use an object as an array without modifying it in JavaScript?
Learn how you can leverage the Proxy object to use a JavaScript object the same way as you would use a regular array.
The JavaScript snippet collection contains a wide variety of ES6 helper functions. It includes helpers for dealing with primitives, arrays and objects, as well as algorithms, DOM manipulation functions and Node.js utilities.
Learn how you can leverage the Proxy object to use a JavaScript object the same way as you would use a regular array.
Learn how JavaScript handles mutable data, such as objects and arrays, and understand how shallow cloning and deep cloning work.
Learn how to perform various transformations on the keys of a JavaScript object.
Learn how to get a nested object property by key or a path string in JavaScript, and how to search for nested values in an object.
Learn how JavaScript's iterators work and how you can use them to level up your projects by understanding these short code examples.
Convert the data from an HTML form into a JavaScript object or serialize it into a query string.
Ever wanted to sort an array of objects, but felt like it was too complex? Here's a robust solution for just that.
Group array elements into two or more arrays arrays, depending on the provided function's return value.
Learn how to manipulate JavaScript objects by flattening or unflattening them.
Learn how to use the JavaScript ES6 spread syntax to converting iterables to arrays and level up your code today.
Convert between a query string and its object representation in JavaScript.
Learn how to combine two or more objects into a single object in JavaScript.
Enums are part of TypeScript, but what about defining enums in plain old JavaScript? Here are a few way you can do that.
Learn how to implement the singleton design pattern in JavaScript, using the Proxy object.
Maps and objects are very similar, but they have some differences that can help you decide which one better fits your use-case.
Learn how you can compare two objects in JavaScript using various different techniques.
Converts a comma-separated values (CSV) string to a 2D array of objects. The first row of the string is used as the title row.
Converts an array of objects to a comma-separated values (CSV) string that contains only the columns
specified.
Map an object to an object array, using the provided mapping function.
Learn how to merge two arrays of objects, while combining objects based on a specified key.
Learn how to compact an array or object in JavaScript using the Boolean
function and recursion.
Learn how to group and count the values of a JavaScript array using simple array methods.
Find all the keys in a JavaScript object that match the given value.
Learn the differences between the three most commonly used iteration methods in JavaScript, that often confuse beginners and veterans alike.