Ok, I’ve tried removing the parenthesis. I’ve checked that I have user.id === posters.users.id and still no success. I still get the same error message. I’m a little confused on what is meant by return the result of user.id === poster.user.id. To me, I read this as you want me to have the function check if a conditional is valid or not. Therefore, my original code was this:
const avatars = ((posters, users) => {
return posters.map((poster) => {
const user = users.find((user) => user.id === poster.user.id ? true : false);
});
});
but I know that doesn’t work so I’ve tried this:
const avatars = ((posters, users) => {
return posters.map((poster) => {
const user = users.find(user => user.id === poster.user.id);
});
});
still doesn’t work. I’ve tried many possible permutations of code but still get stuck with that console message.
Side note - one thing that is majorly confusing me is why in some arrow functions, they must be written as the whole function, i.e.
const myFunction = ((param) => {codeblock});
and why other times the parameter isn’t fully separated, like this:
const myFunction = (param => code);
From my second example of real code above, I tried removing the parenthesis from the parameter as instructed. But why remove them from this particular arrow function when the two other arrow functions in the same “avatar” code block have their parameters isolated? I haver not seen any sort of regularity when it comes to applying parameters either with or without isolation. If anybody could explain why, I think I might not encounter problems like I’m having on this step anymore.
Or maybe it’s the particular way they are evaluated - I don’t know. Anyway, I’m still stuck on this step.
Thank you all for your help thus far!
Jeff