{"ScriptPreparationCode":"\r\nvar funcMap = {\r\n \u0027a\u0027: function() { return 1; },\r\n \u0027b\u0027: function() { return 2; },\r\n \u0027c\u0027: function() { return 3; },\r\n \u0027d\u0027: function() { return 4; },\r\n \u0027e\u0027: function() { return 5; }\r\n}\r\n\r\n\r\nfunction getRandomKey() {\r\n var rIdx = Math.floor(Math.random() * 5);\r\n return Object.keys(funcMap)[rIdx];\r\n}\r\n","TestCases":[{"Name":"using funcMap","Code":"var key = getRandomKey();\r\nvar x = funcMap[key]();\r\nconsole.log(x);\r\n\r\n","IsDeferred":false},{"Name":"using switch","Code":"var key = getRandomKey();\r\nvar x;\r\nswitch(key) {\r\n\tcase \u0027a\u0027: x = 1; break;\r\n case \u0027b\u0027: x = 2; break;\r\n case \u0027c\u0027: x = 3; break;\r\n case \u0027d\u0027: x = 4; break;\r\n case \u0027e\u0027: x = 5; break;\r\n}\r\n\r\nconsole.log(x);","IsDeferred":false}]}