Skip to main content
CSS-Tricks
  • Articles
  • Notes
  • Links
  • Guides
  • Almanac
  • Picks
  • Shuffle
Search

Articles Tagged
arrays

6 Articles
{
,

}
Image
Direct link to the article Creating Arrays in Hasura
arrays data graphql hasura

Creating Arrays in Hasura

Hasura is one of my favorite ways to create a managed GraphQL API for my applications. I find it easy and straightforward as well as suitable for a wide range of use cases. However, since working with Hasura, I’ve seen …

Image
Sarah Drasner on Jan 4, 2021
Image
Direct link to the article Using the Grid Shepherd Technique to Order Data with CSS
arrays data grid

Using the Grid Shepherd Technique to Order Data with CSS

Shepherds are good at tending to their sheep, bringing order and structure to their herds. Even if there are hundreds of those wooly animals, a shepherd still herds them back to the farm at the end of the day.

When …

Image
David Bernegger on May 28, 2019
Image
Direct link to the article An Illustrated (and Musical) Guide to Map, Reduce, and Filter Array Methods
arrays filter JavaScript map reducer

An Illustrated (and Musical) Guide to Map, Reduce, and Filter Array Methods

Map, reduce, and filter are three very useful array methods in JavaScript that give developers a ton of power in a short amount of space. Let’s jump right into how you can leverage (and remember how to use!) these super …

Image
Una Kravets on Mar 26, 2019 Updated on Apr 2, 2019
Image
Direct link to the article Does it mutate?
arrays JavaScript

Does it mutate?

This little site by Remy Sharp’s makes it clear whether or not a JavaScript method changes the original array (aka mutates) or not.

I was actually bitten by this the other day. I needed the last element from an array, …

Image
Chris Coyier on Jan 18, 2019
Image
Direct link to the article Understanding the Almighty Reducer
arrays JavaScript reduce reducer

Understanding the Almighty Reducer

I was recently mentoring someone who had trouble with the .reduce() method in JavaScript. Namely, how you get from this:

const nums = [1, 2, 3]
let value = 0

for (let i = 0; i < nums.length; i++) {
  
…
Image
Sarah Drasner on Jun 13, 2018
Image
Direct link to the article Alphabetizing Arrays, Objects, and Arrays of Objects
arrays objects sorting

Alphabetizing Arrays, Objects, and Arrays of Objects

Alphabetizing can be a little tricky, as you might want to be case-insensitive with what you are sorting. Also, arrays are the thing that you sort, but sometimes you have an object. Or an array of objects. Or otherwise nested combinations...
Image
Chris Coyier on Apr 18, 2018

CSS-Tricks is powered by DigitalOcean.

Keep up to date on web dev

with our hand-crafted newsletter

DigitalOcean
  • About DO
  • Cloudways
  • Legal stuff
  • Get free credit!
CSS-Tricks
  • Contact
  • Write for CSS-Tricks!
  • Advertise with us
Social
  • RSS Feeds
  • CodePen
  • Mastodon
  • Bluesky
Back to Top
Advertisement