{"ScriptPreparationCode":"// Array with alternating empty and non-empty arrays\r\nconst arraySize = 1000;\r\nvar testArray = new Array(arraySize)\r\n .fill(null)\r\n .map((_, i) =\u003E i % 2 === 0\r\n // Make the values alternate between 0-2\r\n ? new Array(i).fill(0).map((_, j) =\u003E j % 2) \r\n : []);\r\n\r\nfunction doubleNegateLength({ length }) {\r\n return !!length; \r\n}\r\n\r\nfunction lengthGreaterThanZero({ length }) {\r\n return length \u003E 0;\r\n}\r\n\r\nfunction doubleNegate(value) {\r\n return !!value;\r\n}\r\n\r\nvar booleanConstructor = Boolean;","TestCases":[{"Name":"Double negation (!!row.length)","Code":"testArray.filter(doubleNegateLength);","IsDeferred":false},{"Name":"Comparison (row.length \u003E 0)","Code":"testArray.filter(lengthGreaterThanZero);","IsDeferred":false},{"Name":"Double negation (!!row)","Code":"testArray.filter(doubleNegate);","IsDeferred":false},{"Name":"Boolean constructor","Code":"testArray.filter(booleanConstructor);","IsDeferred":false}]}