{"ScriptPreparationCode":"var array = [];\r\nfor (var i = 0; i \u003C 10000; i\u002B\u002B) {\r\n const obj = {\r\n data: {\r\n bool: !!Math.floor(Math.random() * 100 \u003E 75)\r\n },\r\n str: Math.floor(Math.random() * 100)\r\n };\r\n array.push(obj);\r\n array.push({...obj, str: obj.str \u002B 1 });\r\n}","TestCases":[{"Name":"Array.filter","Code":"var tempResult = array.filter(({ data, str }) =\u003E {\r\n const shouldBeTrue = data.bool;\r\n const isSmall = str \u003C 2;\r\n \r\n return shouldBeTrue \u0026\u0026 isSmall;\r\n });","IsDeferred":false},{"Name":"Array.find","Code":"var tempResult = array.find(({ data, str }) =\u003E {\r\n const shouldBeTrue = data.bool;\r\n const isSmall = str \u003C 2;\r\n \r\n return shouldBeTrue \u0026\u0026 isSmall;\r\n });","IsDeferred":false},{"Name":"Array.includes","Code":"var tempResult = array.includes(({ data, str }) =\u003E {\r\n const shouldBeTrue = data.bool;\r\n const isSmall = str \u003C 2;\r\n \r\n return shouldBeTrue \u0026\u0026 isSmall;\r\n });","IsDeferred":false},{"Name":"Array.reduce","Code":"var tempResult = array.reduce((found, { data, str }) =\u003E {\r\n const shouldBeTrue = data.bool;\r\n const isSmall = str \u003C 2;\r\n \r\n if(shouldBeTrue \u0026\u0026 isSmall) {\r\n return { count: found.count \u002B 1 };\r\n } else {\r\n return found;\r\n }\r\n }, { found: 0 });","IsDeferred":false},{"Name":"for","Code":"var tempResult = [];\r\nfor (var i = 0; i \u003C array.length; i\u002B\u002B) {\r\n const {data, str} = array[i];\r\n \r\n const shouldBeTrue = data.bool;\r\n const isSmall = str \u003C 2;\r\n \r\n if(shouldBeTrue \u0026\u0026 isSmall) {\r\n tempResult.push(array[i]);\r\n }\r\n}","IsDeferred":false}]}