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.

  1. indexOf()
  2. lastIndexOf()
  3. concat()
  4. join()
  5. push()
  6. pop()
  7. reverse()
  8. shift()
  9. unshift()
  10. slice()
  11. splice()
  12. toString()
  13. filter()
  14. map()
  15. every()
  16. reduceRight()
  17. reduce()
  18. some()
  19. sort()
  20. fill()

Full article with example available an on canopas blog.

The full source code is available on Github.

Deja una respuesta



Canopas is helping entrepreneurs, small business owners, startups to actualize their dreams and achieve business goals. Bringing technology to life!