Like any language, JavaScript has certain commands and rules for writing them. You can start learning this language with the following things:
Code structure (how a program is composed, where it starts, in what sequence commands are given, etc.).
Variables (what they are, what they are used for, how they are defined and used in scripts).
Data types, e.g., number, string, logical type, and type conversion.
Operators, such as how addition is done. Priority of operators (which actions are executed first, which are executed second, etc.). There are comparison operators, conditional operators, and logical operators.
To learn how to use loops (what they are, what they are for, how to set them). In simple terms, loops allow you to perform the same operation several times (until a condition occurs that completes the loop).
Functions.
Objects and their properties.
Prototypes, inheritance.
Classes and class inheritance.
Interface events (handling cursor movements, mouse clicks, keyboard key presses).
Programming interface elements: buttons, forms, etc.
Learning how to write asynchronous code in JavaScript.
Debugging programs in a browser written in JS.
Error handling.
Code quality: how to write a program correctly so that it was easy and simple to navigate both the author and another developer.