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.
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!