To understand the language. Loops, arrays, functions, ways of solving a particular problem, and more.
Having mastered one thing - practice. For example knew what a cycle - open Codepen and create for yourself such as 10 tasks.
For example toggle the active class when clicking on menu items and so on.
Nothing comes easy, especially learning programming languages.