{"ScriptPreparationCode":null,"TestCases":[{"Name":"ES6 Class","Code":"class Point {\r\n\tconstructor(x, y){\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n }\r\n}\r\n\r\nfunction add(p1, p2) {\r\n\treturn new Point(p1.x \u002B p2.x, p1.y \u002B p2.y);\r\n}\r\n\r\nfunction sub(p1, p2) {\r\n\treturn new Point(p1.x - p2.x, p1.y - p2.y);\r\n}\r\n\r\nvar p1 = new Point(10, 10);\r\nvar p2 = new Point(10, -10);\r\nvar sum = add(p1, p2);\r\nvar dif = sub(p1, p2);","IsDeferred":false},{"Name":"Function Prototype","Code":"function Point(x, y){\r\n\tthis.x = x;\r\n\tthis.y = y;\r\n}\r\n\r\nfunction add(p1, p2) {\r\n\treturn new Point(p1.x \u002B p2.x, p1.y \u002B p2.y);\r\n}\r\n\r\nfunction sub(p1, p2) {\r\n\treturn new Point(p1.x - p2.x, p1.y - p2.y);\r\n}\r\n\r\nvar p1 = new Point(10, 10);\r\nvar p2 = new Point(10, -10);\r\nvar sum = add(p1, p2);\r\nvar dif = sub(p1, p2);\r\n","IsDeferred":false},{"Name":"Object Literal","Code":"function add(p1, p2) {\r\n\treturn Point(p1.x \u002B p2.x, p1.y \u002B p2.y);\r\n}\r\n\r\nfunction sub(p1, p2) {\r\n\treturn Point(p1.x - p2.x, p1.y - p2.y);\r\n}\r\n\r\nfunction Point(x, y){\r\n\treturn {\r\n \tx, \r\n \ty,\r\n } \r\n}\r\n\r\nvar p1 = Point(10, 10);\r\nvar p2 = Point(10, -10);\r\nvar sum = add(p1, p2);\r\nvar dif = sub(p1, p2);","IsDeferred":false}]}