GETTING STARTED IN JAVASCRIPT
Tags: beginners
Published: 2022-02-12 16:20:18

##Origin of JavaScript 
JavaScript was created at Netscape Communications by Brendan Eich in 1995. Netscape and Eich designed JavaScript as a scripting language for use with the company's flagship web browser, Netscape Navigator. After its release, more and more browsers started adding JavaScript support. Still, for much of its history JavaScript was not regarded as a serious programming language. Its earliest releases suffered from notable performance and security issues, but developers had no alternatives. If they wanted to run programs in the browser, they had to use JavaScript.

##Getting Started with JavaScript

From the above introduction, we understand that JavaScript is a programing language that runs in browsers or another software called [node.js](https://nodejs.org/en/).
Well, if you have a browser running in your PC, you should be able to use JavaScript from that single browser. 
I recommend that you use a text editor to write code, then run the code from your browser. Here are a few simple steps that you can use to have everything set.

1. **Install a text editor**
There are different text editors out there that can be used to write code. Examples include VsCode, Atom, Sublime text and also notepad. In this work I recommend that you get VsCode because of its many advantages in ease of writing code

- Head out to [VsCode ](https://code.visualstudio.com/download) and get the version of VsCode that best runs in your machine
![versions](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/etsf425ko4wf2p6qyg1c.PNG)
- once your download is complete, just go ahead and install!!.
![download and install](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9q9bvlz7tmx9lo1slnzq.jpg)
- After installing your vscode, open it. Then click on the last icon in the leftmost navigation pane. this is where you get extensions. 
![installations](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/05mbp2wnd6w5wcvcydfk.png)
- Search for live server and click install. **Here you need some internet connection**
![live server](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ntr9muqei5olpyq8bg74.png)
Once you are done, everything is set for now, lets write some code, shall we??

2. **Create your project folder.**
- In your desktop create a folder and give it **any name** you want. 
- open that folder and on the route path, type **cmd**![route changing](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hr4dkn0nay4k6m0yrv3e.PNG)
- In the terminal, type **code .** to open the folder in vs code. 
![terminal command](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/557nyfl3zyh7gqj1nqlu.PNG)
- In the vs code window, click on new file and save it as index.html
-Type html:5 and hit tab button to create your first html file in this folder
- just above the closing tag of the **body** tag, type script:src to link the html file to the JavaScript file. in between the "" marks, type index.js
![js file](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bs1llulr3ao8lqyn4qcg.PNG) 
- create a new file and name it index.js
**All is set now and we are ready to code in javascript**

3. **Create your First JavaScript file.**
- In your index.js file, type the following: `alert("hello world");` and save your work
- In your **index.html** file, right click and click **open with live server**
- Once in your browser, you should be able to see the alert pop up with the message that you typed in
![pop up](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/feapmf3p7qbxtapx9ii4.PNG)
- click okay and then right click this page and inspect it. go for the console tab and once again type the following: `alert("hello world");`. The alert should pop up again.

**_Up to that point, you have everything set and you are ready to go. you have all files set and congratulations for writing your first JavaScript code_**
Next on in this series we shall look at the basics of JavaScript and the data types in JavaScript.
Happy coding and keep practicing.
![Happy coding](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/robn2cwr20a4042w2hib.gif)