Upcoming SlideShare
×

# 3-Looping and Branching

54
-1

Published on

Published in: Education, Technology
0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

Views
Total Views
54
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
1
0
Likes
0
Embeds 0
No embeds

No notes for slide

### 3-Looping and Branching

1. 1. USING CONDITIONAL CODE
2. 2. CONDITIONAL CODE If( ) { } condition // your additional code goes here // . . .
3. 3. TERMINOLOGY parentheses brackets braces ( ) { } [ ]
4. 4. CONDITIONAL CODE If( ) { } condition echo “it’s true!”; // . . . \$a < 50\$b > 20 true or false? \$c == 99\$c === 99\$d != 100 Code block
5. 5. EQUALITY If( \$a == \$b ){ // execute this code }
6. 6. ASSIGNMENT INSTEAD OF EQUALITY \$a = 5; \$b = 10; If( \$a = \$b ){ // always true! }
7. 7. OPERATOR WITH = = assignment == equality === strict equality
8. 8. COMPARISON If( \$a == \$b ){ … If( \$a != \$b ){ … If( \$a === \$b ){ … If( \$a !== \$b ){ … If( \$a > \$b ){ … If( \$a < \$b ){ … If( \$a >= \$b ){ … If( \$a <= \$b ){ …
9. 9. LOGICAL AND / OR If( \$a === \$b \$c === \$d){… If( \$a === \$b \$c === \$d){… If( (\$a > \$b) && (\$c > \$d) ){… and&& or||
10. 10. assingment • Mark Sheet • Even Numbers and Odd Numbers Series • Prime Number Series • Fibonacci Number Series • Generate Star Pyramid • electricity billing system
1. #### A particular slide catching your eye?

Clipping is a handy way to collect important slides you want to go back to later.