{"ScriptPreparationCode":"function setup() {\r\n\r\n const randInt = (min, max) =\u003E\r\n Math.floor(Math.random() * (max - min \u002B 1) \u002B min);\r\n\r\n const itemMap = {};\r\n const itemArr = [];\r\n\r\n for (let i = 0; i \u003C 10000; i\u002B\u002B) {\r\n const item = {\r\n id: randInt(0, 1000000),\r\n value: \u0060value-${randInt(0, 1000000)}\u0060\r\n };\r\n itemArr.push(item);\r\n itemMap[item.id] = item;\r\n }\r\n\r\n const itemIdsToGet = [itemArr[8002].id, itemArr[2423].id, itemArr[5322].id, itemArr[3].id, itemArr[7242].id]\r\n \r\n return {\r\n itemIdsToGet,\r\n itemMap,\r\n itemArr\r\n }\r\n}","TestCases":[{"Name":"map","Code":"const values = setup();\r\n\r\nfor (const itemIdToUpdate of values.itemIdsToGet) {\r\n values.itemMap[itemIdToUpdate].value = \u0027updated\u0027\r\n}","IsDeferred":false},{"Name":"array","Code":"const values = setup();\r\n\r\nfor (const itemIdToUpdate of values.itemIdsToGet) {\r\n const index = values.itemArr.findIndex(x =\u003E x.id === itemIdToUpdate);\r\n \r\n values.itemArr[index].value = \u0027updated\u0027;\r\n\r\n}","IsDeferred":false}]}