"Did you create a function called list?"



It comes up with an error message saying "Oops, try again. Did you create a function called list?".

What the ■■■■ do I do????

I'm pretty sure list isn't meant to be blue...


Can you post the rest of the code for a reference?


Note: I just deleted the addresses for my friends' sakes.

BTW, no idea what the last 'list' part means, so on a side note, I'll figure it out after I resolve this problem.


Make sure the parameter for your function matches the second argument of your for in loop and that you're using your first argument in the console.log statement.


I just tried that, I got the same message, "Oops, try again. Did you create a function called list?"


Going by that screenshot, it does not match what I instructed.

var list = function(parameter){
for(var first argument in second argument){
console.log(first argument)

your screenshot indicates that your parameter matches your first argument, it should match your second, and you are not using your first argument in your console.log()

On a side note, you are calling your function right?
If you don't type list() on the last code line, your function will not run.


Okay, so I got all the names.

Thanks, sorry I just can't read.


I'm having the same issues. I think the instructions and the hints for this one are too unclear. At least add a hint to solve the problem, or a better error message since this is the first time the "for each" loop is used in this course. Because you are looping over "objects in objects" its pretty confusing which arguments goes where, and there's no IntelliSense yo guide the user.


Yeah, I stuffed up the next part, so I went stuff it, and I'm starting again.


I managed to fix it, but I have to admit the instructions are not clear. For someone just learning programming this might be pretty tricky. I'm new to JS, but have been coding for a few years in other languages.


your script should look like this :

var list = function(friends)
for( var X in friends)

where x can be whatever you want. Don't quote me on that, but I realized if I put whatever I want instead of "X" like: water, boat, age, fish, and I have it to console.log(X), the script always display bill and steve.
I don't know if this makes sense to you or not, for me IT DOES NOT :)).
If someone is willing to explain this, I would really appreciate it. Thank you