{"ScriptPreparationCode":"var animal = \u0022dog\u0022","TestCases":[{"Name":"Switch","Code":"function test(animal) {\r\n switch(animal){\r\n case \u0027cat\u0027: return \u0027Kitten\u0027\r\n case \u0027cattle\u0027: return \u0027Calf\u0027\r\n case \u0027cheetah\u0027: return \u0027Cub\u0027\r\n case \u0027dog\u0027: return \u0027Pup\u0027\r\n default: return \u0022I don\u0027t know that\u0022\r\n}\r\n}\r\n\r\n\r\nconsole.log(test(animal))","IsDeferred":false},{"Name":"Object Literal","Code":"function test(animal) {\r\n var babyAnimal = {\r\n cat:\u0027Kitten\u0027,\r\n cattle:\u0027Calf\u0027,\r\n cheetah:\u0027Cub\u0027,\r\n dog:\u0027Pup\u0027\r\n}\r\n\r\nreturn babyAnimal[animal] ?? \u0022I don\u0027t know that\u0022\r\n}\r\n\r\nconsole.log(test(animal))","IsDeferred":false}]}