Lecture+12+-+JS+If+part+2

Lecture+12+-+JS+If+part+2 - CS170Lecture12...

Info iconThis preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 170 Lecture 12 JS If statements part 1 Kristian Stout stouty@rci.rutgers.edu Office IN: Livingston Student Center, A lounge near “the rock” and the commuter lounge. Office Hours: TTH 5:30 – 6:30
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
If-Else Statements Allows execution of a set of statements if a  condition is true and another set of statements if  condition is false if (<Boolean expression>) { <then-statement>; } else { <else-statement>; } The Boolean expression is evaluated first If the outcome is true, the then-statement is executed  and the else-statement is skipped If the outcome is false, the then-statement is skipped  and the else-statement is executed
Background image of page 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 6
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 8
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
The “if - else if - else” statement provides multiple  branches of conditional path of execution The value of the variable can satisfy more than  one expression in the compound statement. 
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/17/2011 for the course BUSINESS 198:170 taught by Professor Staff during the Spring '09 term at Rutgers.

Page1 / 29

Lecture+12+-+JS+If+part+2 - CS170Lecture12...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online