{"ScriptPreparationCode":"var obj = { \u0022a\u0022: 1, \u0022b\u0022: 2, \u0022c\u0022: 3, \u0022d\u0022: 4 };\r\n","TestCases":[{"Name":"For in","Code":"var sum = 0;\r\nfor (var val in obj) {\r\n sum \u002B= obj[val];\r\n}","IsDeferred":false},{"Name":"Obj.keys for loop","Code":"var sum = 0;\r\nvar keys = Object.keys(obj);\r\nfor (var i=0; i\u003C keys.length; i\u002B\u002B) {\r\n sum \u002B= obj[keys[i]];\r\n}","IsDeferred":false},{"Name":"Object.keys reduce","Code":"function add(sum, key) {\r\n return sum \u002B obj[key];\r\n}\r\nObject.keys(obj).reduce(add, 0);","IsDeferred":false},{"Name":"For in function","Code":"function sumObj(obj) {\r\n var sum = 0;\r\n for (var val in obj) {\r\n sum \u002B= obj[val];\r\n }\r\n return sum;\r\n}\r\nsumObj(obj);","IsDeferred":false},{"Name":"Object.keys for loop function","Code":"function sumObj(obj) {\r\n var sum = 0;\r\n var keys = Object.keys(obj);\r\n for (var i=0; i\u003C keys.length; i\u002B\u002B) {\r\n sum \u002B= obj[keys[i]];\r\n }\r\n return sum;\r\n}\r\nsumObj(obj);","IsDeferred":false},{"Name":"Object.keys reduce function","Code":"function sumObj(obj) {\r\n function add(sum, key) {\r\n return sum \u002B obj[key];\r\n }\r\n return Object.keys(obj).reduce(add, 0);\r\n}\r\nsumObj(obj);","IsDeferred":false},{"Name":"Object.keys for loop 2","Code":"function sumObj(obj) {\r\n var sum = 0;\r\n for (var i=0; i\u003C Object.keys(obj).length; i\u002B\u002B) {\r\n sum \u002B= obj[Object.keys(obj)[i]];\r\n }\r\n return sum;\r\n}\r\nsumObj(obj);","IsDeferred":false}]}