Test case details

Preparation Code

const objsMega = []; const coercionMega = []; for(let i=0; i<1000; i++) { objsMega.push({ ['_' + i]: i }); coercionMega.push({ ['_' + i]: i, valueOf: () => "" + i }); }

Test cases

Test #1

let sum = false; for (i = 0; i< coercionMega.length; i++) { sum = coercionMega[i] == null || sum; }

Test #2

let sum = false; for (i = 0; i< coercionMega.length; i++) { sum = (coercionMega[i] === null || coercionMega[i] === undefined) || sum; }

Test #3

let sum = false; for (i = 0; i< objsMega.length; i++) { sum = objsMega[i] == null || sum; }

Test #4

let sum = false; for (i = 0; i< objsMega.length; i++) { sum = (objsMega[i] === null || objsMega[i] === undefined) || sum; }