From 64bc7cb6eecb9ba7dc75a6811a7a8c92bbc25728 Mon Sep 17 00:00:00 2001 From: MANISH-GIRI Date: Thu, 9 Mar 2017 09:07:47 -0500 Subject: [PATCH] Convert lookup table to object --- .../basic-javascript.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/02-javascript-algorithms-and-data-structures/basic-javascript.json b/challenges/02-javascript-algorithms-and-data-structures/basic-javascript.json index fa84e620cc..f960b73f06 100755 --- a/challenges/02-javascript-algorithms-and-data-structures/basic-javascript.json +++ b/challenges/02-javascript-algorithms-and-data-structures/basic-javascript.json @@ -4542,7 +4542,7 @@ "Here is an example of a simple reverse alphabet lookup:", "
var alpha = {
1:\"Z\",
2:\"Y\",
3:\"X\",
4:\"W\",
...
24:\"C\",
25:\"B\",
26:\"A\"
};
alpha[2]; // \"Y\"
alpha[24]; // \"C\"

var value = 2;
alpha[value]; // \"Y\"
", "
", - "Convert the switch statement into a lookup table called lookup. Use it to lookup val and assign the associated string to the result variable." + "Convert the switch statement into an object called lookup. Use it to lookup val and assign the associated string to the result variable." ], "releasedOn": "January 1, 2016", "challengeSeed": [