{"ScriptPreparationCode":"// Declaring our Animal object\r\nvar Animal = function () {\r\n\r\n this.name = \u0027unknown\u0027;\r\n\r\n this.getName = function () {\r\n return this.name;\r\n }\r\n\r\n return this;\r\n};\r\n\r\n// Declaring our Dog object\r\nvar Dog = function () {\r\n\r\n // A private variable here \r\n var private = 42;\r\n\r\n // overriding the name\r\n this.name = \u0022Bello\u0022;\r\n\r\n // Implementing \u0022.bark()\u0022\r\n this.bark = function () {\r\n return \u0027MEOW\u0027;\r\n } \r\n\r\n return this;\r\n};\r\n\r\n\r\n// Dog extends animal\r\nDog.prototype = new Animal();\r\n\r\n// Creating an instance of Dog.\r\nvar obj = new Dog();\r\n\r\nfunction iterateA() {\r\n var ret = \u0022\u0022;\r\n \r\n for (var prop in obj) {\r\n if( obj.hasOwnProperty( prop ) ) {\r\n ret \u002B= obj[prop];\r\n } \r\n }\r\n \r\n return ret;\r\n}\r\n\r\nfunction iterateB() {\r\n var ret = \u0022\u0022;\r\n \r\n Object.keys(obj).forEach(function (prop) {\r\n ret \u002B= obj[prop];\r\n });\r\n\r\n return ret;\r\n}\r\n\r\nfunction iterateC() {\r\n var ret = \u0022\u0022;\r\n\r\n for (var i = 0, keys = Object.keys(obj); i \u003C keys.length; i\u002B\u002B) {\r\n ret \u002B= obj[i];\r\n }\r\n\r\n return ret;\r\n}\r\n\r\nfunction iterateD() {\r\n var ret = \u0022\u0022;\r\n\r\n for (var keys = Object.keys(obj), len = keys.length, i = 0; i \u003C len; i\u002B\u002B) {\r\n ret \u002B= obj[i];\r\n }\r\n\r\n return ret;\r\n}\r\n","TestCases":[{"Name":"A","Code":"var tmp = iterateA();","IsDeferred":false},{"Name":"B","Code":"var tmp = iterateB();","IsDeferred":false},{"Name":"C","Code":"var tmp = iterateC();","IsDeferred":false},{"Name":"D","Code":"var tmp = iterateD();","IsDeferred":false}]}