{"ScriptPreparationCode":"var a = 10;\r\nvar b = 2;\r\nvar c = 0;\r\n\r\nvar curObj = {\r\n a : a,\r\n b : b,\r\n c : c\r\n};\r\nvar nonZeroDivisorResult = 0;\r\nvar zeroDivisorResult = 0;","TestCases":[{"Name":"IF Logic","Code":"if(b){\r\n nonZeroDivisorResult = a/b;\r\n}\r\nelse{\r\n nonZeroDivisorResult = 0;\r\n}\r\n\r\nif(c){\r\n zeroDivisorResult = a/c;\r\n}\r\nelse{\r\n zeroDivisorResult = 0;\r\n}","IsDeferred":false},{"Name":"Ternary Logic","Code":"nonZeroDivisorResult = b ? a/b : 0;\r\nzeroDivisorResult = c ? a/c : 0;","IsDeferred":false},{"Name":"AND Logic","Code":"nonZeroDivisorResult = b \u0026\u0026 a/b;\r\nzeroDivisorResult = c \u0026\u0026 a/c;","IsDeferred":false},{"Name":"IF Logic with sloppy variable handling","Code":"if(curObj.b){\r\n nonZeroDivisorResult = curObj.a/curObj.b;\r\n}\r\nelse{\r\n nonZeroDivisorResult = 0;\r\n}\r\n\r\nif(curObj.c){\r\n zeroDivisorResult = curObj.a/curObj.c;\r\n}\r\nelse{\r\n zeroDivisorResult = 0;\r\n}","IsDeferred":false},{"Name":"Ternary Logic with sloppy variable handling","Code":"nonZeroDivisorResult = curObj.b ? curObj.a/curObj.b : 0;\r\nzeroDivisorResult = curObj.c ? curObj.a/curObj.c : 0;","IsDeferred":false},{"Name":"AND Logic with sloppy variable handling","Code":"nonZeroDivisorResult = curObj.b \u0026\u0026 curObj.a/curObj.b;\r\nzeroDivisorResult = curObj.c \u0026\u0026 curObj.a/curObj.c;","IsDeferred":false}]}