Professional Documents
Culture Documents
Sheet Cheat
Sheet Cheat
Java 8
if-elseif-else T
Ternary
ernary switch
SYNTAX Operator SYNTAX
(condition1) {
if
SYNTAX
switch(condition) {
// block of code to be case x:
variable = (condition) ?
executed if condition1 is // code block…
expressionTrue :
true
EXAMPLE expressionFalse; EXAMPLE
int time = 20; switch (day) {…
if (time < 10) {…
Java If ... Else 18) ? "Good day " : "Good Java Switch
SOURCE
DEFINITIONTYPE DEFINITIONTYPE
Java Short Hand If...Else
if switch
(Ternary Operator)
TIPO DE ESTRUCTURA TIPO DE ESTRUCTURA
DEFINITIONTYPE
Estructuras de Control Estructuras de Control
Ternary Operator
TIPO DE ESTRUCTURA
Estructuras de Control
for-loop N
Nested
ested Loops for-each-loop
SYNTAX SYNTAX SYNTAX
or (statement 1;
for
f Outer loop
// for (type variableName :
statement 2; statement 3)
for (statement 1; arrayName) {
{ statement 2; statement 3) // code block to be
// code block to be { executed
EXAMPLE EXAMPLE EXAMPLE
while-loop d
do/while-loop
o/while-loop
SYNTAX SYNTAX
while (condition) { {
do
// code block to be // code block to be
executed executed
} }
EXAMPLE EXAMPLE
int i = 0; int i = 0;
while (i < 5) {… do {…
SOURCE SOURCE
Java While Loop Java While Loop
DEFINITIONTYPE DEFINITIONTYPE
while-loop do/while-loop
Javascript 4
if-elseif-else T
Ternary
ernary Ternary
SYNTAX Operator Operator(Multi-
f (condition1) {
if
i
// block of code to be
SYNTAX
SYNTAX
l ti )
variable = condition ?
executed if condition1 … variable = condition1 ?
expressionTrue :
expression1-condition1-
EXAMPLE expressionFalse;
true : condition2 ? …
const time = 22; EXAMPLE
EXAMPLE
//ONE EVALUATION:
if (time < 10) {… const hour = 10;
time = 20;
SOURCE
switch
statement
SYNTAX
S
switch(expression) {
case x:
…
// code block
EXAMPLE
const day = 4;
switch (day) {…
SOURCE
JavaScript Switch Statement
DEFINITIONTYPE
switch
TIPO DE ESTRUCTURA
Estructuras de Control
Python 3
if-elif-else T
Ternary
ernary switch
SYNTAX Operator EXAMPLE
f condition1:
if
i
SYNTAX
#code if condition1 is
#One line if statement:
true
if condition: #One line
DEFINITIONTYPE
EXAMPLE code to execute if
switch
condition is true
time = 22 TIPO DE ESTRUCTURA
EXAMPLE
#One line if statement:
Estructuras de Control
if time < 10:
print("Good morning ")
time = 20
SOURCE
Python Conditions
SOURCE
DEFINITIONTYPE Python Conditions
if
DEFINITIONTYPE
TIPO DE ESTRUCTURA
Ternary Operator
Estructuras de Control
TIPO DE ESTRUCTURA
Estructuras de Control
Kotlin 0