DEV Community

Cover image for 20 Array methods in Typescript you need to know with examples
Raksha for Canopas Software

Posted on

3 1

20 Array methods in Typescript you need to know with examples

We, programmers, play with Arrays all the time, and yet most of the time we don’t know all helper functions provided by the TypeScript.

Pre-built functions have always been proved time-savers. Find the list of utility functions in typescript with demonstrations.

I have listed out 20 methods that you need to know, with fun emojis.

indexOf()
lastIndexOf()
concat()
join()
push()
pop()
reverse()
shift()
unshift()
slice()
splice()
toString()
filter()
map()
every()
reduceRight()
reduce()
some()
sort()
fill()
Full article with example available an on canopas blog.

The full source code is available on Github.

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay