{"ScriptPreparationCode":"const getSwitch = function (input) {\r\n\tswitch(input) {\r\n \tcase 0:\r\n \treturn \u0027zero\u0027;\r\n \tcase 1:\r\n \t\treturn \u0027one\u0027;\r\n \tcase 2:\r\n \t\treturn \u0027two\u0027;\r\n \tcase 3:\r\n \t\treturn \u0027three\u0027;\r\n \tcase 4:\r\n \t\treturn \u0027four\u0027;\r\n \tcase 5:\r\n \t\treturn \u0027five\u0027;\r\n \tcase 6:\r\n \t\treturn \u0027six\u0027;\r\n \tcase 7:\r\n \t\treturn \u0027seven\u0027;\r\n \tcase 8:\r\n \t\treturn \u0027eight\u0027;\r\n \tcase 9:\r\n \t\treturn \u0027nine\u0027;\r\n \tcase 10:\r\n \t\treturn \u0027ten\u0027;\r\n \t}\r\n}\r\n\r\nconst LUT = {\r\n\t0: \u0027zero\u0027,\r\n \t1: \u0027one\u0027,\r\n \t2: \u0027two\u0027,\r\n \t3: \u0027three\u0027,\r\n \t4: \u0027four\u0027,\r\n \t5: \u0027five\u0027,\r\n \t6: \u0027six\u0027,\r\n \t7: \u0027seven\u0027,\r\n \t8: \u0027eight\u0027,\r\n \t9: \u0027nine\u0027,\r\n \t10: \u0027ten\u0027\r\n}\r\n\r\nconst map = new Map([\r\n [0, \u0027zero\u0027],\r\n [1, \u0027one\u0027],\r\n [2, \u0027two\u0027],\r\n [3, \u0027three\u0027],\r\n [4, \u0027four\u0027],\r\n [5, \u0027five\u0027],\r\n [6, \u0027six\u0027],\r\n [7, \u0027seven\u0027],\r\n [8, \u0027eight\u0027],\r\n [9, \u0027nine\u0027],\r\n [10, \u0027ten\u0027]\r\n]);","TestCases":[{"Name":"switch function","Code":"const result = getSwitch(Math.floor(Math.random() * 10));","IsDeferred":false},{"Name":"switch inline","Code":"let result;\r\nswitch(Math.floor(Math.random() * 10)) {\r\n case 0:\r\n \tresult = \u0027zero\u0027;\r\n \tbreak;\r\n case 1:\r\n \tresult = \u0027one\u0027;\r\n \tbreak;\r\n case 2:\r\n \tresult = \u0027two\u0027;\r\n \tbreak;\r\n case 3:\r\n \tresult = \u0027three\u0027;\r\n \tbreak;\r\n case 4:\r\n \tresult = \u0027four\u0027;\r\n \tbreak;\r\n case 5:\r\n \tresult = \u0027five\u0027;\r\n \tbreak;\r\n case 6:\r\n \tresult = \u0027six\u0027;\r\n \tbreak;\r\n case 7:\r\n \t\tresult = \u0027seven\u0027;\r\n \tbreak;\r\n case 8:\r\n \tresult = \u0027eight\u0027;\r\n \tbreak;\r\n case 9:\r\n \tresult = \u0027nine\u0027;\r\n \tbreak;\r\n case 10:\r\n \tresult = \u0027ten\u0027;\r\n \tbreak;\r\n \t}","IsDeferred":false},{"Name":"object","Code":"const result = LUT[Math.floor(Math.random() * 10)];","IsDeferred":false},{"Name":"Map","Code":"const result = map.get(Math.floor(Math.random() * 10));","IsDeferred":false}]}