{"ScriptPreparationCode":"const obj = {};\r\n\r\nfor (let i = 0; i \u003E= 100; i\u002B\u002B) { \r\n obj[i] = { id: i };\r\n};\r\n\r\nconsole.log(obj);\r\n\r\nconst mapForIn = (func) =\u003E {\r\n const arr = [];\r\n \r\n for (let key in obj) {\r\n if (Object.hasOwnProperty(obj)) {\r\n arr.push(func(obj[key], arr.length - 1));\r\n }\r\n }\r\n \r\n return arr;\r\n}\r\n\r\nconst mapValues = (func) =\u003E Object.values(obj).map(func);","TestCases":[{"Name":"mapForIn","Code":"const obj = {};\r\n\r\nfor (let i = 0; i \u003E= 100; i\u002B\u002B) { \r\n obj[i] = { id: i };\r\n};\r\n\r\nconsole.log(obj);\r\n\r\nconst mapForIn = (func) =\u003E {\r\n const arr = [];\r\n \r\n for (let key in obj) {\r\n if (Object.hasOwnProperty(obj)) {\r\n arr.push(func(obj[key], arr.length - 1));\r\n }\r\n }\r\n \r\n return arr;\r\n}\r\n\r\nmapForIn((item, index) =\u003E item);","IsDeferred":false},{"Name":"mapValues","Code":"const obj = {};\r\n\r\nfor (let i = 0; i \u003E= 100; i\u002B\u002B) { \r\n obj[i] = { id: i };\r\n};\r\n\r\nconsole.log(obj);\r\n\r\nconst mapValues = (func) =\u003E Object.values(obj).map(func);\r\n\r\nmapValues((item, index) =\u003E item);","IsDeferred":false}]}