{"ScriptPreparationCode":"var array = [1, 3, 2];\r\nfor(let i = 5; i \u003E 0; i--) {\r\n\tvar array = array.concat(array);\r\n};\r\n\r\nvar mappingJSON = {\r\n\t1: function() {\r\n \treturn \u0027one\u0027;\r\n },\r\n \t2: function() {\r\n \treturn \u0027two\u0027;\r\n },\r\n \t3: function() {\r\n \treturn \u0027three\u0027;\r\n \t}\r\n};","TestCases":[{"Name":"if/else","Code":"for(let i = array.length - 1; i \u003E= 0; i--) {\r\n \tlet item = array[i];\r\n\tif(item === 1) {\r\n \tconsole.log(\u0027one\u0027);\r\n } else if(item === 2) {\r\n \tconsole.log(\u0027two\u0027);\r\n } else if(item === 3) {\r\n \tconsole.log(\u0027three\u0027);\r\n };\r\n};","IsDeferred":false},{"Name":"switch/case","Code":"for(let i = array.length - 1; i \u003E= 0; i--) {\r\n \tlet item = array[i];\r\n\tswitch(item) {\r\n \tcase 1:\r\n \t\tconsole.log(\u0027one\u0027);\r\n \tbreak;\r\n \tcase 2:\r\n \t\tconsole.log(\u0027two\u0027);\r\n \tbreak;\r\n \tcase 3:\r\n \t\tconsole.log(\u0027three\u0027);\r\n \tbreak;\r\n };\r\n};","IsDeferred":false},{"Name":"JSON","Code":"for(let i = array.length - 1; i \u003E= 0; i--) {\r\n \tlet item = array[i];\r\n\tconsole.log(mappingJSON[item]());\r\n};","IsDeferred":false}]}