Presentation is loading. Please wait.

Presentation is loading. Please wait.

JavaScript conditional

Similar presentations


Presentation on theme: "JavaScript conditional"— Presentation transcript:

1 JavaScript conditional

2 Boolean Logic Basis for modern computer logic
George Boole Basis for modern computer logic Works with only two values George Boole was an english mathematician and philosopher. Born 1815, died 1864.

3 BOOLEAN VARIABLE OR EXPRESSION
Holds either true or false can pass as a literal Can be thought of as yes or no Open excel – type true or false into a cell, and show that excel automatically capitlizes & centers it. TRUE & FALSE are special values in excel.

4 Is greater than or equal to
Boolean expressions Creates a Boolean value from numbers or strings Operator Meaning == Is equal to != Is not equal > Is greater than < Is less than >= Is greater than or equal to <= Is less than or equal to

5 Conditionals Test if a Boolean expression is true or false
Allows a program to make a choice

6 IF … THEN … ELSE if (MUST BE LOWERCASE)
no else: do nothing if not true else: one or the other [elseif: series of choices]

7 Switching then and else
Operator Meaning == Is equal to != Is not equal > Is greater than < Is less than >= Is greater than or equal to <= Is less than or equal to


Download ppt "JavaScript conditional"

Similar presentations


Ads by Google