Skip to content

Latest commit

 

History

History
52 lines (35 loc) · 2.21 KB

File metadata and controls

52 lines (35 loc) · 2.21 KB

JavaScript

JavaScript

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.

All Language Image

How to write script of web pages :

  • 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.

So , What does the Script mean?

A script is a series of instructions that a computer can follow one-by-one.

Each individual instruction or step is known as a statement. Statements should end with a semicolon

Variables

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 Image

There are too many types of variables ; We explain them in the table below .

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.

Finally the image below show the main differences between JavaScript , HTML and CSS languages

Differences Languages

References

** JAVASCRIPT & JQUERY Interactive Front-End Web Development Book ** , which was written by *** JON DUCKETT ***