To be clear I don’t believe there is a way to learn just Computer Science, without learning some concepts of coding, same for the other way around, where I don’t believe there is a way to learn coding without learning CS.
Generally try to learn both, but be ready to jump between the two to really get a gasp of programming.
You can focus on learning one or the other, but both requires the other, so there will be some overlap and “extra learning” no matter what. I think you want to ask which one to focus on first and it depends on what your currently having problems on, and identifying if its a CS issue or a coding issue.
If you have issues understanding what the code does or means, its a coding/syntax problem, read about what class
and extends
means (mdn is a good resource) in the language, and go off from there. CS concepts like OOP concepts are language independent, but might be represented differently depending on the language. Identifying what the syntax means in a CS context is the knowledge you use to “bridge” the two domains that is only learned once you get a good grasp of both domains (CS and the language of your choice, like JS).
If your having issues understanding how to approach a given problem, its a mix of CS and coding, where you need to first understand the underlying problem, and how to program the solution with the given language. Programming/coding is more than knowing the syntax of the language, knowing how to wield it is where CS concepts come in. Knowledge of the language might improve your coding, but knowing how to solve a given problem is more generic than how to “just code it”
I’d compare programming to learning to write a poem or papper. You can learn more words (learning the language syntax), but that doesn’t mean you can write a great poem, as that require’s more knowledge of the subject and experience from writing.
PS. On a similar note I dislike the word “coding”. When I think of code, I think of morse-code, enigma-code and secret codes, it gives in to the idea that “programming code” is hard to read, secret, and difficult to understand, which I think is the wrong way to think. Programming is more generic, more generic than code itself, in the sense you the programmer can make something do something based on instructions. One of the first programmers, Ada Lovelace was writing “code” for physical computers. The ideas underlying languages today are the same ones underlying languages from yesterday. Knowing how a given language’s syntax applies to Computer Science concepts is the key to learning new languages and understanding most problems.
Goodluck, keep at it