{"ScriptPreparationCode":"const map = {\r\n one: 1,\r\n two: 2,\r\n three: 3,\r\n four: 4,\r\n five: 5,\r\n six: 6,\r\n seven: 7,\r\n eight: 8,\r\n nine: 9,\r\n ten: 10,\r\n}\r\n\r\nfunction byMap(val) {\r\n return map[val]\r\n}\r\n\r\nfunction bySwitch(val) {\r\n switch (val) {\r\n case \u0027one\u0027:\r\n return 1;\r\n case \u0027two\u0027:\r\n return 2;\r\n case \u0027three\u0027:\r\n return 3;\r\n case \u0027four\u0027:\r\n return 4;\r\n case \u0027five\u0027:\r\n return 5\r\n case \u0027six\u0027:\r\n return 6\r\n case \u0027seven\u0027:\r\n return 7\r\n case \u0027eight\u0027:\r\n return 8\r\n case \u0027nine\u0027:\r\n return 9\r\n case \u0027ten\u0027:\r\n return 10\r\n }\r\n}","TestCases":[{"Name":"Map","Code":"byMap(\u0027one\u0027)\r\nbyMap(\u0027two\u0027)\r\nbyMap(\u0027three\u0027)\r\nbyMap(\u0027four\u0027)\r\nbyMap(\u0027five\u0027)\r\nbyMap(\u0027six\u0027)\r\nbyMap(\u0027seven\u0027)\r\nbyMap(\u0027eight\u0027)\r\nbyMap(\u0027nine\u0027)\r\nbyMap(\u0027ten\u0027)","IsDeferred":false},{"Name":"Switch","Code":"bySwitch(\u0027one\u0027)\r\nbySwitch(\u0027two\u0027)\r\nbySwitch(\u0027three\u0027)\r\nbySwitch(\u0027four\u0027)\r\nbySwitch(\u0027five\u0027)\r\nbySwitch(\u0027six\u0027)\r\nbySwitch(\u0027seven\u0027)\r\nbySwitch(\u0027eight\u0027)\r\nbySwitch(\u0027nine\u0027)\r\nbySwitch(\u0027ten\u0027)","IsDeferred":false}]}