Happy New Year! The first day of the new year is today. 2023 has begun. We have lost another year of our life. On the first day of the new year, write your first JavaScript code and start your coding journey. So let's get started.
Before starting coding you need to create a folder on your computer. Then enter that folder and right-click on the mouse, if you have Git Bash installed on your computer then you will see an option called Git Bash Here. A Terminal will open by clicking there. Here you enter this command: code . then your folder will be opened in VS Code Editor.
If you want to enter VS Code and open the folder manually, in that case, you have to press ctrl+O to open the folder.
The next step is to make a JavaScript file and place it in that folder. The file extension must be included at the end of the filename when creating the file. You have two options in this situation:
1. You can create a file by clicking on the icon shown in the image below:
2. Open the Terminal of VS Code and enter this command here: touch fileName. Let's say, you want to create a file named index.js, in that case you will give the touch index.js command.
Note that, you will be a developer, you should start getting used to working with the terminal right away.
To print something with JavaScript, type it into console.log('yourText'). It should be typed inside a single or double quotation mark if the data type of what you want to see in the output is a string, otherwise, there is no need to provide quotation marks if the data type is a number. Adding a semicolon to the end of the bracket is optional. Try to code like the example in the image below.
Now open the Terminal again and give this command: node fileName, suppose your file name is index.js then you should give the node index.js Command here. If your inputs are printed as output to the terminal, you should be happy! because your first JavaScript code is successfully executed. Now, put more practice on it.



