{"ScriptPreparationCode":null,"TestCases":[{"Name":"Try/catch","Code":"function checkEven(num) {\r\n if (num % 2 === 0) { return true; }\r\n throw new Error(\u0027Number is odd\u0027);\r\n}\r\n\r\nfor (let i = 0; i \u003C 1000;\u002B\u002Bi) {\r\n let res;\r\n try {\r\n checkEven(i); \r\n res = true;\r\n } catch (err) {\r\n res = false;\r\n }\r\n}","IsDeferred":false},{"Name":"Without try/catch","Code":"function checkEven(num) {\r\n if (num % 2 === 0) { return true; }\r\n return false;\r\n}\r\n\r\nfor (let i = 0; i \u003C 1000;\u002B\u002Bi) {\r\n let res;\r\n if (checkEven(i)) {\r\n res = true; \r\n } else {\r\n \tres = false; \r\n }\r\n}","IsDeferred":false},{"Name":"Try/catch throwing a string","Code":"function checkEven(num) {\r\n if (num % 2 === 0) { return true; }\r\n throw \u0027Number is odd\u0027;\r\n}\r\n\r\nfor (let i = 0; i \u003C 1000;\u002B\u002Bi) {\r\n let res;\r\n try {\r\n checkEven(i); \r\n res = true;\r\n } catch (err) {\r\n res = false;\r\n }\r\n}","IsDeferred":false}]}