Please enable JavaScript.
Coggle requires JavaScript to display documents.
Writing conditional code (syntax (true/false, parenthesis, curly braces -…
Writing conditional code
Program is running in a straight flow
some examples
driving example
traffic signal
conditional operators
comparison
==, !=, >, <, >=, <=
logical
&&, ||, !
syntax
true/false
parenthesis
curly braces - code block
curly can be on the same line or next line
Else examples
Nested If
beyond three levels is difficult to read
Switch Statement
break statement
English syntax
calculator program
add, multiple etc in straight
how do we make conditions?