ReadingNote201

JS-Basics

Statements should end with a semicolon. Each of the lines of code in green is a statement The pink curly braces indicate the start and end of a code block. (Each code block could contain many more statements.)

to dclear a variable var x ; and then you can assign value x=20 datatypes :

you can use scpe character to use the character that you cant use it (/) x= ‘dosen/’t’

Decission and loops

decision

decision-making statement which is used to decide whether a block of JavaScript code will execute if a certain condition is true

logical operator

DATA TYPE PURPOSE

string => Text number => Number Boolean => true or false null => Empty value undefined => Variable has been declared but not yet assigned a value

type coercion : JavaScript can convert data types behind the scenes to complete an operation strong typing :specify what data type each variable will be.

loops

if you want to run the same code over and over again, each time with a different value.

KEY LOOP CONCEPTS:

break:This keyword causes the termination of the loop and tells the interpreter to go onto the next statement of code outside of the loop. continue: This keyword te lls the interpreter to continue with the current iteration, and then check the condition again.