{"ScriptPreparationCode":"var switch_func = term =\u003E {\r\n switch (term) {\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 case \u0027eleven\u0027:\r\n return 11;\r\n case \u0027twelve\u0027:\r\n return 12;\r\n case \u0027thirteen\u0027:\r\n return 13;\r\n case \u0027fourteen\u0027:\r\n return 14;\r\n case \u0027fifteen\u0027:\r\n return 15;\r\n case \u0027sixteen\u0027:\r\n return 16;\r\n case \u0027seventeen\u0027:\r\n return 17;\r\n case \u0027eighteen\u0027:\r\n return 18;\r\n case \u0027nineteen\u0027:\r\n return 19;\r\n case \u0027twenty\u0027:\r\n return 20;\r\n }\r\n};\r\n\r\nvar ifelse_func = term =\u003E {\r\n if (term === \u0027one\u0027) {\r\n return 1;\r\n } else if (term === \u0027two\u0027) {\r\n return 2;\r\n } else if (term === \u0027three\u0027) {\r\n return 3;\r\n } else if (term === \u0027four\u0027) {\r\n return 4;\r\n } else if (term === \u0027five\u0027) {\r\n return 5;\r\n } else if (term === \u0027six\u0027) {\r\n return 6;\r\n } else if (term === \u0027seven\u0027) {\r\n return 7;\r\n } else if (term === \u0027eight\u0027) {\r\n return 8;\r\n } else if (term === \u0027nine\u0027) {\r\n return 9;\r\n } else if (term === \u0027ten\u0027) {\r\n return 10;\r\n } else if (term === \u0027eleven\u0027) {\r\n return 11;\r\n } else if (term === \u0027twelve\u0027) {\r\n return 12;\r\n } else if (term === \u0027thirteen\u0027) {\r\n return 13;\r\n } else if (term === \u0027fourteen\u0027) {\r\n return 14;\r\n } else if (term === \u0027fifteen\u0027) {\r\n return 15;\r\n } else if (term === \u0027sixteen\u0027) {\r\n return 16;\r\n } else if (term === \u0027seventeen\u0027) {\r\n return 17;\r\n } else if (term === \u0027eighteen\u0027) {\r\n return 18;\r\n } else if (term === \u0027nineteen\u0027) {\r\n return 19;\r\n } else if (term === \u0027twenty\u0027) {\r\n return 20;\r\n }\r\n};\r\n\r\nvar lookup_func = term =\u003E {\r\n var lookup = {\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 eleven: 11,\r\n twelve: 12,\r\n thirteen: 13,\r\n fourteen: 14,\r\n fifteen: 15,\r\n sixteen: 16,\r\n seventeen: 17,\r\n eighteen: 18,\r\n nineteen: 19,\r\n twenty: 20,\r\n };\r\n return lookup[term];\r\n};\r\n\r\nvar cached_lookup = {\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 eleven: 11,\r\n twelve: 12,\r\n thirteen: 13,\r\n fourteen: 14,\r\n fifteen: 15,\r\n sixteen: 16,\r\n seventeen: 17,\r\n eighteen: 18,\r\n nineteen: 19,\r\n twenty: 20,\r\n};\r\n\r\nvar cached_lookup_func = term =\u003E cached_lookup[term];\r\n\r\n","TestCases":[{"Name":"switch","Code":"switch_func(\u0027one\u0027);\r\nswitch_func(\u0027seven\u0027);\r\nswitch_func(\u0027twelve\u0027);\r\nswitch_func(\u0027ten\u0027);\r\nswitch_func(\u0027nineteen\u0027);\r\nswitch_func(\u0027three\u0027);\r\nswitch_func(\u0027thirteen\u0027);\r\nswitch_func(\u0027eight\u0027);\r\nswitch_func(\u0027seventeen\u0027);\r\nswitch_func(\u0027two\u0027);\r\nswitch_func(\u0027five\u0027);\r\nswitch_func(\u0027eighteen\u0027);\r\nswitch_func(\u0027twenty\u0027);\r\nswitch_func(\u0027nine\u0027);\r\nswitch_func(\u0027eleven\u0027);\r\nswitch_func(\u0027fourteen\u0027);\r\nswitch_func(\u0027six\u0027);\r\nswitch_func(\u0027fifteen\u0027);\r\nswitch_func(\u0027sixteen\u0027);\r\nswitch_func(\u0027four\u0027);","IsDeferred":false},{"Name":"if/else","Code":"ifelse_func(\u0027one\u0027);\r\nifelse_func(\u0027seven\u0027);\r\nifelse_func(\u0027twelve\u0027);\r\nifelse_func(\u0027ten\u0027);\r\nifelse_func(\u0027nineteen\u0027);\r\nifelse_func(\u0027three\u0027);\r\nifelse_func(\u0027thirteen\u0027);\r\nifelse_func(\u0027eight\u0027);\r\nifelse_func(\u0027seventeen\u0027);\r\nifelse_func(\u0027two\u0027);\r\nifelse_func(\u0027five\u0027);\r\nifelse_func(\u0027eighteen\u0027);\r\nifelse_func(\u0027twenty\u0027);\r\nifelse_func(\u0027nine\u0027);\r\nifelse_func(\u0027eleven\u0027);\r\nifelse_func(\u0027fourteen\u0027);\r\nifelse_func(\u0027six\u0027);\r\nifelse_func(\u0027fifteen\u0027);\r\nifelse_func(\u0027sixteen\u0027);\r\nifelse_func(\u0027four\u0027);","IsDeferred":false},{"Name":"lookup","Code":"lookup_func(\u0027one\u0027);\r\nlookup_func(\u0027seven\u0027);\r\nlookup_func(\u0027twelve\u0027);\r\nlookup_func(\u0027ten\u0027);\r\nlookup_func(\u0027nineteen\u0027);\r\nlookup_func(\u0027three\u0027);\r\nlookup_func(\u0027thirteen\u0027);\r\nlookup_func(\u0027eight\u0027);\r\nlookup_func(\u0027seventeen\u0027);\r\nlookup_func(\u0027two\u0027);\r\nlookup_func(\u0027five\u0027);\r\nlookup_func(\u0027eighteen\u0027);\r\nlookup_func(\u0027twenty\u0027);\r\nlookup_func(\u0027nine\u0027);\r\nlookup_func(\u0027eleven\u0027);\r\nlookup_func(\u0027fourteen\u0027);\r\nlookup_func(\u0027six\u0027);\r\nlookup_func(\u0027fifteen\u0027);\r\nlookup_func(\u0027sixteen\u0027);\r\nlookup_func(\u0027four\u0027);","IsDeferred":false},{"Name":"pre-cached lookup","Code":"cached_lookup_func(\u0027one\u0027);\r\ncached_lookup_func(\u0027seven\u0027);\r\ncached_lookup_func(\u0027twelve\u0027);\r\ncached_lookup_func(\u0027ten\u0027);\r\ncached_lookup_func(\u0027nineteen\u0027);\r\ncached_lookup_func(\u0027three\u0027);\r\ncached_lookup_func(\u0027thirteen\u0027);\r\ncached_lookup_func(\u0027eight\u0027);\r\ncached_lookup_func(\u0027seventeen\u0027);\r\ncached_lookup_func(\u0027two\u0027);\r\ncached_lookup_func(\u0027five\u0027);\r\ncached_lookup_func(\u0027eighteen\u0027);\r\ncached_lookup_func(\u0027twenty\u0027);\r\ncached_lookup_func(\u0027nine\u0027);\r\ncached_lookup_func(\u0027eleven\u0027);\r\ncached_lookup_func(\u0027fourteen\u0027);\r\ncached_lookup_func(\u0027six\u0027);\r\ncached_lookup_func(\u0027fifteen\u0027);\r\ncached_lookup_func(\u0027sixteen\u0027);\r\ncached_lookup_func(\u0027four\u0027);","IsDeferred":false}]}