The JavaScript is added last and enhances the usability of the page or the experience of interacting with the site.
It's written in plain text, just like HTML and CSS, so you do not need any new tools to write a script.
-
It is best to keep JavaScript code in its own JavaScript file. JavaScript files are text files (like HTML pages and CSS style sheets), but they have the . j s extension.
-
The HTML <script> element is used in HTML pages to tell the browser to load the JavaScript file (rather like the element can be used to load a CSS file).
-
If you view the source code of the page in the browser, the JavaScript will not have changed the HTML, because the script works with the model of the web page that the browser has created.
A script will have to temporarily store the bits of information it needs to do its job. It can store this data in variables.
| Variable | Code Type | Data Type |
|---|---|---|
| Integer | int | number |
| Float | float | number |
| Double | double | number |
| String | string | text |
| Charachter | char | text |
| Boolian | bool | structure type that represents a Boolean value, which can be either true or false. |



