---
title: "Discussion on \"I wrote polyfills for 32 JavaScript Array methods!\" | Hashnode"
description: "Discussion on \"I wrote polyfills for 32 JavaScript Array methods!\". In this article, I have shared my custom implementation of 32 Javascript array methods. It includes the polyfills for map, filter, reduce, flat, sort, etc."
url: "https://hashnode.com/posts/i-wrote-polyfills-for-32-javascript-array-methods/631dee2f3e8d6f3497ad6861"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [I wrote polyfills for 32 JavaScript Array methods!](https://blog.siddhigate.com/i-wrote-polyfills-for-32-javascript-array-methods?utm_source=hashnode&utm_medium=feed)

In this article, I have shared my custom implementation of 32 Javascript array methods. It includes the polyfills for map, filter, reduce, flat, sort, etc.

Sep 11, 2022 · 24 min read · blog.siddhigate.com  
Updated Feb 3, 2024  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#array](https://hashnode.com/tag/array)
-   [#array-methods](https://hashnode.com/tag/array-methods)
-   [#polyfills](https://hashnode.com/tag/polyfills)

## Written by

[Siddhi Gate](https://hashnode.com/@siddhigate)

@siddhigate · Remote

  
[View profile](https://hashnode.com/@siddhigate)

Solving problems through code

## Responses 3

Markdown supported · ⌘↵ to post

[Rob Balmf](https://hashnode.com/@robalmf)

[Feb 20, 2025](https://hashnode.com/posts/i-wrote-polyfills-for-32-javascript-array-methods/631dee2f3e8d6f3497ad6861/comment/67b67c1ccbad778e87546edf)

Hi Siddhi, many thanks for sharing these very useful functions. Just wanted to let you know about a minor bug in "myFindLastIndex". It starts its search one position beyond the end of the array, so the first item the callback is given is "undefined", which can cause an exception if a property of the item is being checked e.g. "item => item.foo === 'bar'".

This: for (let i = this.length; i >= 0; i--) {

Should be: for (let i = this.length - 1; i >= 0; i--) {

All the best

[Anand Baraik](https://hashnode.com/@anandbaraik)

[Mar 26, 2023](https://hashnode.com/posts/i-wrote-polyfills-for-32-javascript-array-methods/631dee2f3e8d6f3497ad6861/comment/64209089bdbe7d697133c61c)

It's very helpful & insightful. thank you so so much for writing this in depth article on array methods & its polyfills implementations. :)

[Siddhi Gate](https://hashnode.com/@siddhigate)

[Mar 27, 2023](https://hashnode.com/posts/i-wrote-polyfills-for-32-javascript-array-methods/631dee2f3e8d6f3497ad6861/comment/64209089bdbe7d697133c61c#reply-64218b02ef222d750ccf19af)

Super glad you liked it🙌

[Abhishek Kumar](https://hashnode.com/@Abhi21st)

[Oct 8, 2022](https://hashnode.com/posts/i-wrote-polyfills-for-32-javascript-array-methods/631dee2f3e8d6f3497ad6861/comment/63410ff7250857e669efb7c0)

I liked it.❤💖 Can we have Polyfill for String Methods as well?

[Siddhi Gate](https://hashnode.com/@siddhigate)

[Mar 27, 2023](https://hashnode.com/posts/i-wrote-polyfills-for-32-javascript-array-methods/631dee2f3e8d6f3497ad6861/comment/63410ff7250857e669efb7c0#reply-64218aeaa52e2874dcd06361)

Will plan to do so!
