{"ScriptPreparationCode":"function sumBasic(numbers) {\r\n let sum = 0;\r\n for (const number of numbers) {\r\n sum \u002B= number;\r\n }\r\n return sum;\r\n}\r\n\r\nfunction sumBranched(numbers) {\r\n let sum = 0;\r\n if (Array.isArray(numbers)) {\r\n for (const number of numbers) {\r\n sum \u002B= number;\r\n }\r\n } else if (numbers !== undefined) {\r\n sum = numbers;\r\n }\r\n return sum;\r\n}\r\n\r\nvar singleArray = [10];\r\nvar emptyArray = [];\r\nvar largeArray = [...Array(1000).keys()];","TestCases":[{"Name":"basic empty","Code":"sumBasic(emptyArray);","IsDeferred":false},{"Name":"branched empty","Code":"sumBranched(undefined);","IsDeferred":false},{"Name":"basic single","Code":"sumBasic(singleArray);","IsDeferred":false},{"Name":"branched single","Code":"sumBranched(10);","IsDeferred":false},{"Name":"basic large","Code":"sumBasic(largeArray);","IsDeferred":false},{"Name":"branched large","Code":"sumBranched(largeArray);","IsDeferred":false}]}