For example, the solution to this problems just seems so foreign to me.
refer some JS course you can find it all over the internet . Yeah JS is hard but it doesn’t mean you cannot learn , So work on it .
I suggest find a learning partner or group, that will it will be much easier to discuss, clarify & learn with team.
The most newbie mistake one can make is attempting to code out your solution without trying to come up with a manual solution. As in writing out your solution with pen and paper or out on a whiteboard like your working out an algebraic problem. They tend confuse misunderstanding
When you can understand the problem and create the manual process behind it, the coding isn’t all that difficult. This is because you can correlate the real world problem to a computer science concept much easier.
Oh, it’s more than a newbie mistake. In fact, I’d say experienced programmers are even more prone to doing this. Sometimes the experience wins out and one can just stream out code straight from their brains for the win. More often than not however, a little pseudocode and/or diagramming will go a long way toward making the real code much smoother.