FilterableExamplesFree
map()Creates new array with results of calling fn on every elementTransform
[1,2,3].map(x => x * 2) // [2,4,6]
filter()Creates new array with elements that pass the testTransform
[1,2,3,4].filter(x => x > 2) // [3,4]
reduce()Reduces array to a single value by accumulatingTransform
[1,2,3].reduce((a,b) => a+b, 0) // 6
forEach()Executes fn once for each element. Returns undefinedIterate
[1,2].forEach(x => console.log(x))
find()Returns first element that passes testSearch
[1,2,3].find(x => x > 1) // 2
findIndex()Returns index of first element that passes testSearch
[1,2,3].findIndex(x => x > 1) // 1
some()Tests if at least one element passesSearch
[1,2,3].some(x => x > 2) // true
every()Tests if all elements passSearch
[1,2,3].every(x => x > 0) // true
includes()Checks if array contains a valueSearch
[1,2,3].includes(2) // true
indexOf()Returns first index of value, or -1Search
[1,2,3].indexOf(2) // 1
push()Adds elements to end. Returns new lengthMutate
arr.push(4) // arr is now [..., 4]
pop()Removes last element. Returns itMutate
[1,2,3].pop() // 3
shift()Removes first element. Returns itMutate
[1,2,3].shift() // 1
unshift()Adds elements to start. Returns new lengthMutate
arr.unshift(0) // [0, ...]
splice()Adds/removes elements at indexMutate
arr.splice(1, 1) // remove 1 at index 1
slice()Returns shallow copy of portionTransform
[1,2,3,4].slice(1,3) // [2,3]
concat()Merges two or more arraysTransform
[1,2].concat([3,4]) // [1,2,3,4]
flat()Flattens nested arrays by depthTransform
[[1,2],[3]].flat() // [1,2,3]
flatMap()Maps then flattens by one levelTransform
[1,2].flatMap(x => [x, x*2]) // [1,2,2,4]
sort()Sorts elements in placeMutate
[3,1,2].sort() // [1,2,3]
reverse()Reverses array in placeMutate
[1,2,3].reverse() // [3,2,1]
join()Joins all elements into a stringTransform
[1,2,3].join("-") // "1-2-3"
Array.from()Creates array from iterable or array-likeCreate
Array.from("abc") // ["a","b","c"]
Array.isArray()Checks if value is an arraySearch
Array.isArray([1]) // true
at()Returns element at index (supports negative)Search
[1,2,3].at(-1) // 3
Share:Copied!
Was this tool helpful?

Get a free API key + new tools as they ship

100 calls/day, no card, no spam. Built by one person, in public.

About Array Methods

Array Methods is a free, browser-based utility designed to make developer and design work as quick and frictionless as possible. Built to be the kind of tool you bookmark and use weekly: no surprises between visits, no degraded free tier, and a UI that gets out of the way. It is one of about a hundred developer tools that share the same philosophy: do one thing, do it well, get out of your way.

When you'd reach for Array Methods

  • You're on a public or shared machine and don't want to leave traces of what you're working on.

    Travelers, contractors, anyone working from a friend's computer.

    Nothing is uploaded, nothing persists if you're not signed in.

  • You're cleaning up a folder of files that accumulated over a project and need to standardize them.

    Designers, writers, and developers wrapping up deliverables.

    Drop each file in, copy the output, move on.

  • You're hitting the daily limit of a paid SaaS and need a backup option for a single quick job.

    Marketers and ops people whose primary tool is metered.

    Stay productive without burning credits.

  • You need to handle a one-off task right before a meeting and don't have time to install anything.

    Anyone working remotely on a borrowed or restricted machine.

    Open the page, get the result, paste it into your doc — under a minute.

Frequently asked about Array Methods

Are my files uploaded to a server when I use Array Methods?
Array Methods processes everything in your browser using local APIs. Your files never leave your device.
Will Array Methods change my original file?
Never. Array Methods only reads your input file and produces a new output file.
Do I need to create an account to use Array Methods?
No. Array Methods works without any signup. We only ask for an email if you decide to subscribe to a paid plan.
Can I use Array Methods commercially?
Yes. The output of Array Methods belongs entirely to you, with no licensing restrictions.
Does Array Methods work on mobile?
Yes, Array Methods is fully responsive and tested on iOS Safari and Android Chrome.