What is "if"
Basic Syntax
Usually has a syntax like the following:
'if' <condição>
    'then' <instrução-1>
    'else' <instrução-2>
In <condição> may be necessary to close with parentheses (as is in javascript), the keyword then may be omitted (as is in python or c/c++).
else is optional in most languages.
An example of the instruction if in javascript:
var Variavel = 100;
if (Variavel >= 20) {
    alert('Variável é maior ou igual a 20!');
} else {
    alert('Variável é inferior a 20!');
}
As a ternary operator
In c and languages C-Like conditional expressions may take the form of a ternary operator called a conditional expression operator, ?:, following this model:
(condição)?(avaliar se a condição é verdadeira):(avaliar se a condição é falsa)
In python, if is used explicitly in the conditional expression:
(avaliar se a condição é verdadeira) if (condição) else (avaliar se a condição é falsa)
An example using ternary operator in javascript:
var Variavel = 100;
Variavel >= 20
    ? alert('Variável é maior ou igual a 20!')
    : alert('Variável é inferior a 20!');