Skip to content

talhajjaj/read04

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

read04

JavaScript & jQuery

-CONTENT LAYER : . html files This is where the content of the page lives. The HTML gives the page structure and adds semantics. -PRESENTATION LAYER : . css files The CSS enhances the HTML page with rules that state how the HTML content is presented (backgrounds, borders, box dimensions, colors, fonts, etc.).

-BEHAVIOR LAYER .js files This is where we can change how the page behaves, adding interactivity. We will aim to keep as much of our JavaScript as possible in separate files

These three layers form the basis of a popular approach to building web pages called progressive enhancement.

If we want to speak simply about Html ,CSS and JS : so HTML it focus on the content. CSS focus on the page looks . and JS is added last and enhances the usability of the page or the experience of interacting with the site. So we concluded that HTML, CSS, JS languages ​​depend on each other to get a suitable web page.

How to creat A JavaScript file ? A javascript file is just a text file ,like HTML and CSS files are. you can write it in HTML in the end of the , in the <script> tag just write :

<script>//then the varible or the js code </script> .. its a comment .

or you can just creat a folder for js and file inside it to wrote in js language then linked it with HTML page and this is the better way.

there is some roles and grammer for js :

-You should write comments to explain what your code does. They help make your code easier to read and understand. This can help you and others who read your code. to write a comment just add // this forward slash .

-its should have a 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, and when you assigned a value to a variable, you can then change what is stored in the variable later in the same script.

so how to give the variables a value ? once you have created a variable , you can store in it the information that you want , example :

this is the variable name : age and this is a variable value : 20 age = 20

there is atypes of data :

  • NUMERIC DATA TYPE : to handle numbers such : 4 , 55

  • STRING DATA TYPE :its consist letters you can add quots but you should be attentive, These can be single or double quotes, but the opening quote , its means that you must match the closing quot.

  • BOOLEAN DATA TYPE :Boolean data types can have one of two values: true or false.

javascript

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors