My opinion on Official Answers

So I just completed the advanced algo on Symmetrical Difference with some “pair-programming” help.
He told me where to find the official solutions so I had a look at it.

Spoiler alert:

The advanced solution provided is an example of bad programming in my opinion. There is code that I’m not familiar with such as […A]
Note: This was only introduced to JS last year an is the “spread” operation. Thus, it may not work with older browsers.
The code explanation and the comments try but don’t help explain what is going on.
The use of const rather than var is not explained.
I’ve not seen => notation or the Set operator before.
Great that the relevant links take you to these but that’s a lot of reading to do and as this is supposed to be a teaching platform, even more reason to give a full explanation of your thinking.
If I was coming across this whilst working, I would leave it (if the code worked) or completely re-write it as I don’t understand it.
This is why I think it is an example of bad programming.

PS. I looked at someone else’s solution which was a one line solution and it was even more unreadable. Remember if you are a programmer, someone else may have to follow your work when you leave!

You don’t really need to understand the advanced solution directly. It is advanced for a reason. Most ES6 features are already implemented in modern browser, but is certainly good to have a look at compatibility. But that’s just my opinion. BTW: check out these videos on the new features of ES6.


Hi there,

I get what you’re saying, but it is called the advanced solution because it requires a deep understanding of some of JavaScript’s newest and most abstract functionality. I hadn’t actually looked at this solution before, but I think it’s a really stellar example of how to use the spread operator and sets. You haven’t been exposed to ES6 on this site yet because ES3/5 are more common, and that’s generally what you’ll see when looking for help. When you do get more advanced, though, you’ll need to pick up the new syntax.

It would be nice if they had explained it better. That was my main gripe as this is a place where we want to learn, not just be dazzled by strange syntax.

All syntax is dazzling until you learn it :smiley:

The fCC team simply hasn’t gotten to including ES6 yet, though I’m sure it’s in the pipeline. While they don’t explain it, you went the extra distance to look up the new features. That’s good, because you’re going to see lots of things that you don’t understand throughout your career as a developer. It’s important to be able to work out what you don’t know and find the answers. Since you’ve already got the names of those new ES6 features, try looking one or two of them up on YouTube and add some new tools to your tool belt.

1 Like