If it's your first time for coding, I recommend watching tutorials first about JavaScript, you should learn it first at least basics of it. If you jump into trying to understand docs it will be hard for you because you don't yet understand the basics of programming, you won't able to create your own logic.
I have answered lots of questions here in this server, I noticed that some people don't even know the basics of programming, like they don't fully understand how the if-else conditions work, as a result they get hard for them to write their own code. They end up just copying the code that a people give and paste that part in their own without understanding how it actually work.
So, first learn at least basics of JS. Here's what I recommend you need to learn about JS.
• Variables
• Data Types
• Operators
• if-else condition
• Switch statement
• Loops
• Functions
• Array
• Object
Things you could learn later
• Class
• JSON
• Destructuring
• Modules
• JS Asyncs
There are more things to learn, but if you already understand these basics you can start with scripting. Just keep coding and you'll be able to grasp it.