{"ScriptPreparationCode":"var str = \u0027abc\u0027;\r\nstr = str.charAt(Math.floor(Math.random() * 3));\r\n\r\nvar count = 10;","TestCases":[{"Name":"Switch","Code":"function getValue(str, count) {\r\n switch (str) {\r\n case \u0027a\u0027: return \u0027A\u0027.repeat(count);\r\n case \u0027b\u0027: return \u0027B\u0027.repeat(count);\r\n case \u0027c\u0027: return \u0027C\u0027.repeat(count);\r\n }\r\n}\r\n\r\nvar result = getValue(str, count);\r\n\r\nconsole.log(result);","IsDeferred":false},{"Name":"Object Literal","Code":"var objLiteral = {\r\n a: () =\u003E \u0027A\u0027.repeat(count),\r\n b: () =\u003E \u0027B\u0027.repeat(count),\r\n c: () =\u003E \u0027C\u0027.repeat(count)\r\n}\r\n\r\nvar result = objLiteral[str]();\r\n\r\nconsole.log(result);","IsDeferred":false}]}