Using Objects for Lookups totally lost

Using Objects for Lookups totally lost
0

#1

**Tell us what’s happening:**I am utterly lost

Your code so far

// Setup
function phoneticLookup(val) {
  var result = "";

  // Only change code below this line
  
    var lookup = {
      alpha: "Adams",
      bravo: "Boston",
      charlie:"Chicago",
      delta:"Denver",
      echo:"Easy",
      foxtrot:"Frank",
      
};
  
  
  result = lookup[val];
  // Only change code above this line
  return result;
}

// Change this value to test
phoneticLookup("alpha");

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (X11; CrOS x86_64 9592.96.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.114 Safari/537.36.

Link to the challenge:


#2

I am wondering what to do here as I am completely lost. I had absolutely zero idea how to complete this challenge. Has this happened to anybody else here. And if so, did they go on to finally learn javascript and become a successful developer. I’m wondering where I went off track and why I’m not learning this stuff. I’m not dumb, I don’t think. I just really want to know if anyone else has had this level of difficulty and actually went on to land a career in dev? Please help.
Alex Thomas


#3

Keep coding man, you don’t just get a job… you have to build yourself to get it.


#4

The code you posted is correct. Why are you confused about coding a passing solution?


#5

I had to look at the solution. I had no idea what they even wanted.


#6

I hear you brother. I’m just wondering if it’s been this confusing for anyone else. I wouldn’t expect to find a job i’m not qualified for. I mean, I was like, “HUH?” with this question. and it’s not the only one. Anyway, thanks and good luck.


#7

If you ever find yourself not understanding what the challenge wants, feel free to ask for clarification on the forum. There are many people here who are willing to help out a fellow camper when things get confusing. We were all beginners at some point and we all struggled through various concepts/challenges. Over time, you will start to see similarities and patterns in certain types of problems. With enough practice, you will wonder why you were ever confused on certain challenges.


#8

Thanks a lot Randell. I appreciate the encouraging words. I will continue to press on to the light at the end of the tunnel.