js-polyfills
js-polyfills copied to clipboard
bug: Array forEach method
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
hey @siddhigate can i work on this issue??
@hirentimbadiya Thanks for showing interest! Yes, you can work on this issue.
is this issue resolve ?