DEV Community

Khoi
Khoi

Posted on

Learning JavaScript

Part 1:

Ways to code:

  • The simplest way to get started is to simply create an HTML file with the JavaScript code inside of it. Image description
  • The next way is to directly create a JS file. Image description

Simpliest command:

  • The simpliest command you will learn is console.log("write sth you want here").

'console.log() is the command to print something to the developer console in your browser. You can use this to print the results from any of the following articles and exercises to the console. We encourage you to code along with all of the examples in this and future lessons.'
Image description

How to check if you command is doing right?

  • There's a way you can check it:

1. Install Live Server.
Live Server

2. Right click on your code, then click Open with Live Server.
Image description

3. When it open your browser press F12 and you will see a small window like this:
Image description

4. Then click the tag next to it, you will see if your command is right or not:
Image description

Top comments (0)