{"ScriptPreparationCode":null,"TestCases":[{"Name":"with","Code":"function twoNumberSum(array, targetSum) {\r\n\t\r\n\tlet result = [];\r\n\t\r\n\tarray.forEach(\r\n\t\t(element, idx) =\u003E {\r\n\t\t array.forEach((secondElement, secondIdx) =\u003E {\r\n\t\t\t\tif ((idx !== secondIdx) \u0026\u0026 (element \u002B secondElement == targetSum)) {\r\n\t\t\t\t\t\tresult = [element, secondElement];\r\n\t\t\t\t}\r\n\t\t\t\tarray.shift();\r\n\t\t\t})\r\n\t\t}\r\n )\r\n\treturn result;\r\n\t\r\n}\r\n\r\ntwoNumberSum([3, 5, -4, 8, 11, 1, -1, 6],10)","IsDeferred":false},{"Name":"without","Code":"function twoNumberSum(array, targetSum) {\r\n\t\r\n\tlet result = [];\r\n\t\r\n\tarray.forEach(\r\n\t\t(element, idx) =\u003E {\r\n\t\t array.forEach((secondElement, secondIdx) =\u003E {\r\n\t\t\t\tif ((idx !== secondIdx) \u0026\u0026 (element \u002B secondElement == targetSum)) {\r\n\t\t\t\t\t\tresult = [element, secondElement];\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t}\r\n )\r\n\treturn result;\r\n\t\r\n}\r\n\r\ntwoNumberSum([3, 5, -4, 8, 11, 1, -1, 6],10)","IsDeferred":false}]}