{"ScriptPreparationCode":null,"TestCases":[{"Name":"LOGICAL approach","Code":"var result;\r\nfor (let i = 0; i \u003C 30000; i\u002B\u002B) {\r\n const num = Math.floor(Math.random() * 1000);\r\n result = (num % 2 \u0026\u0026 2) || 1;\r\n}\r\nreturn result;","IsDeferred":false},{"Name":"TERNARY approach","Code":"var result;\r\nfor (let i = 0; i \u003C 30000; i\u002B\u002B) {\r\n const num = Math.floor(Math.random() * 1000);\r\n result = num % 2 ? 2 : 1;\r\n}\r\nreturn result;","IsDeferred":false}]}