Skip to content

Instantly share code, notes, and snippets.

@hax
Created November 29, 2023 19:39
Show Gist options
  • Save hax/c16cd2cd3f393ad98249f20b41c222e1 to your computer and use it in GitHub Desktop.
Save hax/c16cd2cd3f393ad98249f20b41c222e1 to your computer and use it in GitHub Desktop.

Array (a collection of elements accessed by integer indices) is probably one of the most commonly used data structures by programmers, and slice is one of the most commonly used array methods. (This statistic also indicates that splice seems to be used more than we thought.)

Method Search Results
push more than 2913780 results from 110260 repositories
forEach 1303701 results from 94472 repositories
slice 743508 results from 76749 repositories
indexOf 621518 results from 63531 repositories
splice 236232 results from 40045 repositories
unshift 92145 results from 19371 repositories
at 75247 results from 7946 repositories
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment