js-polyfills icon indicating copy to clipboard operation
js-polyfills copied to clipboard

bug: Array forEach method

Open siddhigate opened this issue 3 years ago • 3 comments

Handle empty values in an array

Expected output:

const arr1 = [1, 2, 3, , , 6];
arr1.forEach(el => console.log(el)); // 1 2 3 6

const arr2 = [1, 2, 3, undefined, undefined, 6];
arr2.forEach(el => console.log(el)); // 1 2 3 undefined undefined 6

Current output:

const arr1 = [1, 2, 3, , , 6];
arr1.myForEach(el => console.log(el)); // 1 2 3 6

const arr2 = [1, 2, 3, undefined, undefined, 6];
arr2.myForEach(el => console.log(el)); // 1 2 3 6

siddhigate avatar Oct 03 '22 14:10 siddhigate

hey @siddhigate can i work on this issue??

hirentimbadiya avatar Feb 04 '23 11:02 hirentimbadiya

@hirentimbadiya Thanks for showing interest! Yes, you can work on this issue.

siddhigate avatar Feb 04 '23 12:02 siddhigate

is this issue resolve ?

Lalman888 avatar Feb 16 '23 14:02 Lalman888