This article is for beginners of the front end, because JavaScript is very important, I started the time is relatively late, now use VUE more, there is no too much attention to native. A senior in the company who did eight years ago reminded me that JS is very important and I need to learn it well, so I came up with the idea of writing this kind of article.

I’m sure many of you have written about JavaScript, so I won’t go into that too much here. Go straight to the code.

The software I use is vsCode. Start with a new TXT document.

Note that there is a TXT suffix, if you do not show the suffix of the buddy can be here

Click on the box in front of the file extension and check it. We need to change the file extension

Click yes

It is ok

Next open it with vsCode

Enter an exclamation point

Just hit Enter at this point

Next, write the script tag, which is used to write js code

Okay, we’ve made a big step, and now we’re going to write our first piece of code

<script>
        console.log('hello word')
</script>
Copy the code

I go to the browser, and I’m going to go to Google. Click and drag the file in with the left mouse button

According to thisPress F12, Fn+F12 if it’s a laptop with Fn, hit Console

Output Hello Word.

Ok, this is the first line of code, the road is still very long, learn things step by step, not impetuous, goodbye