putting your latest code in the editor the first thing I see is this:
SyntaxError: unknown: Invalid left-hand side in assignment expression (27:8)
25 | return prop = value;
26 | }else if (prop in tracks || tracks != album){
> 27 | return "" += value;
| ^
28 | } else if (prop in tracks || value != ""){
29 | return value.pop.tracks
30 | }else (value = """) {
the only thing you can have to the left side fo an assignmetn operator is a variable, here you have ""
also, one of the challenge instructions is to always return the whole object, which is done in the last line of the function, all other return statements shuld be deleted
the != operator is perfectly fine JavaScript, you can’t use jQuery here. The issue you have on this line is that you do not have a variable track anywhere, so it’s undefined - you want to use a string there, "tracks"
Please do not create duplicate topics for the same challenge/project question(s). This duplicate topic has been unlisted and merged with the other topic you already have on this challenge.
No you could not, that’s a function for filtering a group of DOM elements. It has nothing to do with a boolean NOT operator, which is a core basic piece of the language.
Well, yes, it doesn’t seem right because it isn’t:
it’s tracks not track,
there isn’t a variable called tracks anyway, because
keys of objects are strings, so it should be "tracks"
These are extremely basic syntax errors you’re making. If you haven’t grasped the very, very basics of JS syntax after the year or so you’ve been trying to do this, and you want to learn this stuff, maybe you need to look at some other teaching methods (books? video courses?) because nothing seems to be sticking here. You’re just repeating errors you made months and months ago on the same very basic tasks.
I hate you and love for saying and pointing this one out.
And after doing some reflecting I came to the conclusion.
Yes you are absolutely right. FCC course just does not work for me but, at the same time, I started to doubt other materials as well. I just don’t want to make the same mistake again