---
title: "Comment by Rob Balmf on \"I wrote polyfills for 32 JavaScript Array methods!\" | Hashnode"
description: "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 pos"
url: "https://hashnode.com/posts/i-wrote-polyfills-for-32-javascript-array-methods/631dee2f3e8d6f3497ad6861/comment/67b67c1ccbad778e87546edf"
---

[Discussion](https://hashnode.com/posts/i-wrote-polyfills-for-32-javascript-array-methods/631dee2f3e8d6f3497ad6861)

Comment [I wrote polyfills for 32 JavaScript Array methods!](https://hashnode.com/posts/i-wrote-polyfills-for-32-javascript-array-methods/631dee2f3e8d6f3497ad6861)

[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
