reading-notes

How to use objects and methods.

if we want to show something in our webPage using javaScript we use the following sentence:

’’’ document.write (‘and you write here what you want to show’) ‘’’

JavaScrip runs where it is found in the HTML

When the browser comes across a scriptelement, it stops to load the script and then checks to see if it needs to do anything.

The HTML **

Statements

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.

comments

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. And you can write it using the following tags : /* write your comment here */

loops

loops check a condition. if it returns true, a code block will rum. then the condition will be checked again and if it still returns true, the code block will run again. it repeats until the condition returns false. The main three types of loops are :