Best way to study JS?

For me, Javascript is not like HTML, while I am understanding almost everything I am reading so far, some things and some codes don’t really make sense to me, I really don’t know how to explain this, it’s like I will understand every part of a code while studying it but if I were asked to write the code I will have difficulty. I remember some designers in the past saying they could not understand it too well so they simply copy codes for whatever purpose they desire but I don’t want to do this so how can I make JS studying better please?

It can help to realise that some parts of it are common across many different programming languages. Things like the various loops, operators and conditional statements.

If you don’t already have any understanding of other programming languages, you are going to be facing many more difficulties than usual.

I started HTML and CSS with the Headfirst labs books and now studying JS from their book too, I just personally think it’s either JS is much more complicated than what I have done before or Headfirst did not do a god job with this book, especially when I see codes in the beginning of the book having items which are described in detail in LATER chapters, one person told me I am trying to over simplify the codes, he says I should simply use the codes as given to do my own “similar” projects, for example, he is saying that if a code tells you how to have a rock smile after 5 minutes then whenever I have a similar project just use that code and NOT try to create a code of my own and this is what I am having a problem with, is he wrong? Should I simply keep a list of all codes I come across and use those in the future or should I try to write my own DIFFERENT codes?

How it normally goes is that you use similar code to what you’ve come across in the past, until you gain enough knowledge and confidence to create new code of your own.