# Introduction of JavaScript

### What is javascript ?

- JavaScript is the programming language of the Web.

- JavaScript is the world's most popular programming language.




### Why learn javascript ?

- Javascript is used to add behavior to any web page.

- To intract with java script world we use <script></script>.

- we can also load the javascript file using script tag.

```js
<body>
      <center>
              <button> click me </button>
     </center>
<script src = "./index.js"></script>
</body>
```

- Also Write javascript for server.

- Along with that using Javascript, HTML and CSS .you can create desktop Application .

- you can also create native app for adroid and ios.

- Auto complete search is also done with javascript .

- Animation vedio can also create  Using javascript.

### Different ways to execute javascript in browser.

**1. Adding javascript in an HTML file.**

- Move tha javascript code from HTML file to script.js

- Javascript  file are attached to HTML file using the  *src* attribute of the script tag.

- The *src* Attribute need the path of the javascript file.


**2. Attaching an external javascript file .**

When the code is lot we put into a seprate file.

- Create a file *Script.js*

- Extension of javascript is *.js*





 







