Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Objects for Lookups #6240

Closed
robwelan opened this issue Jan 17, 2016 · 3 comments
Closed

Using Objects for Lookups #6240

robwelan opened this issue Jan 17, 2016 · 3 comments

Comments

@robwelan
Copy link

screen shot 2016-01-17 at 1 06 00 pm
Challenge Using Objects for Lookups has an issue.
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

// Setup
var phoneticLookup = {
  "alpha": "Adams",
  "bravo": "Boston",
  "charlie": "Chicago",
  "delta": "Denver",
  "echo": "Easy",
  "foxtrot": "Frank"
};

// Change this value to test
var val = "bravo";
val = phoneticLookup[val];
@AkiraLaine
Copy link
Member

You are not suppose to change the whole code. Just change the switch statement to a lookup table and make it so that result returns the correct value.

If you need help, please go to the main room or the help room. GitHub is used only for issues.

@mihaelamardare
Copy link

Hello,
I just passed this exercise and I believe that was too tricky. In the default code you should write that it's ok if you change the return command too. I had a hard time because I though I'm not supposed to change it...

@barbieo37
Copy link

I am having a problem with this because the example does not even show where the "lookup" operation is meant to be. Why have an example if it leaves out what is supposed to be happening?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants