Press enter and you will see a alert box. Running JS code is that much easy 😀
The next thing is selecting a editor for writing code. There are plenty of editors like Sublime Text, Atom, Bracket, WebStorm, Visual Studio Code. Now a days I use VS Code a lot and also recommend it.
I will use VS Code for further tutorials. When installing VS Code click all four checkboxes it makes easy to open folder directly on editor.
Now, create a folder such as “learnjs” and right click on it and open with VS Code.
After opening folder now firstly we create a html page “index.html” and then add JS code named “app.js” file into it.
Open index page press ! then TAB, it will create a basic layout. Here in body section write the following code.
Run the index page by double clicking it. press F12 and in in console menu you will see the result.
At this point you are ready to explore the next things but one last thing I want to show is writing JS in another file (app.js) and linking that file to index.html. The code is given below
Happy Learning 😀