{"ScriptPreparationCode":"var arr = [];\r\nfor (var i = 0; i \u003C 1234; i\u002B\u002B) {\r\n const obj = {};\r\n obj[\u0060${i}key\u0060] = i;\r\n arr.push(obj);\r\n}\r\n\r\nfunction shuffle(array) {\r\n let currentIndex = array.length,\r\n randomIndex;\r\n\r\n // While there remain elements to shuffle.\r\n while (currentIndex \u003E 0) {\r\n\r\n // Pick a remaining element.\r\n randomIndex = Math.floor(Math.random() * currentIndex);\r\n currentIndex--;\r\n\r\n // And swap it with the current element.\r\n [array[currentIndex], array[randomIndex]] = [\r\n array[randomIndex], array[currentIndex]\r\n ];\r\n }\r\n\r\n return array;\r\n}\r\n\r\nshuffle(arr);\r\n\r\nvar arr2 = [];\r\nfor (var i = 0; i \u003C 12345; i\u002B\u002B) {\r\n const obj = {};\r\n obj[\u0060${i}key\u0060] = i;\r\n arr2.push(obj);\r\n}","TestCases":[{"Name":"map and filter","Code":"arr2.map((item, key) =\u003E arr[key]).filter(item =\u003E item);","IsDeferred":false},{"Name":"reduce","Code":"arr2.reduce((acc, item, key) =\u003E {if(arr[key]){acc.push(item)}return acc;}, [])","IsDeferred":false}]}