Tell us what’s happening:
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("charlie");
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.2 Safari/605.1.15
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/using-objects-for-lookups
---- I’ve told myself not to bother posting in the forums because it honestly doesn’t seem like anyone actually considers what we say. So this is really pointless, I get that. But why does FCC not provide enough information, context, whatever you want to call it for stuff? If you have to add 500 more challenges to walk us through stuff, do it. If I didn’t just finally result to googling, I would still be trying to figure this out.
You worked us on a couple of object lookup stuff, great, that made sense. The example and instructions were reasonable to the prior learning. Then we get this. You throw a function into it. Are we suppose to use “val” or “result” for the lookup? No, we are suppose to create some new variable, but why? How were we to realize that?
Then we get to the return, that was a little confusing, but then we can realize the techniques from before and reassign result, but if you can’t even understand what’s going on at the lookup, you wouldn’t understand that either.
FCC needs to remember that people here are learning. You can’t just jump into new things when you haven’t fully built a foundation of understanding. How does the “val” get into the lookup? We call the function, and pass in “Charlie” and we are looking for the value (result)… but how is it coming out?
I get that in the “myDog” examples, that myDog.name is going to give me “Fido”. Because myDog is my object and I am targeting the name. Perfect sense. But in this function, you haven’t explained what the heck is going on. At least when it was a switch statement, we were using “val” as the lookup. That made sense. We practiced that.
I know, I totally wasted my time. I just hope FCC would take a look at how they progress us through the challenges and actually think “If I was new, would I understand what is going on?” As I am writing this, the “Your topic is similar to…” section to the right of this has every line with this same problem. Obviously some people are lost. Shouldn’t that be a clue that maybe something needs to be changed?
Im not going to go post on Github. I don’t know why we need to do that in order to be noticed or taken seriously. I don’t need to be given a run around. All I want is for FCC to just think about what people are saying.