From a6011f47d72d1ecfafd4d735de0db074d81e05e5 Mon Sep 17 00:00:00 2001 From: Abhisek Pattnaik Date: Thu, 31 Dec 2015 06:01:47 +0530 Subject: [PATCH] Fix Using Objects for Lookups description --- .../basic-javascript.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seed/challenges/01-front-end-development-certification/basic-javascript.json b/seed/challenges/01-front-end-development-certification/basic-javascript.json index c1505e3792..d1c7b5c92e 100644 --- a/seed/challenges/01-front-end-development-certification/basic-javascript.json +++ b/seed/challenges/01-front-end-development-certification/basic-javascript.json @@ -3544,7 +3544,7 @@ "description": [ "Objects can be thought of as a key/value storage, like a dictonary. If you have tabular data, you can use an object to \"lookup\" values rather than a switch statement or an if/else chain. This is most useful when you know that your input data is limited to a certain range.", "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 alpha = {
1:\"Z\",
2:\"Y\",
3:\"X\",
4:\"W\",
...
24:\"C\",
25:\"B\",
26:\"A\"
};
alpha[2]; // \"Y\"
alpha[24]; // \"C\"
", "

Instructions

", "Convert the switch statement into a lookup table called lookup. Use it to lookup val and return the associated string." ],