Syntax
Syntax of variable
This is the basic syntax for variable declaration in CES.
Conditional syntax
Syntax if
To write a conditional statement in CES, use the if keyword followed by the condition.
The block of code must be written between { }.
Syntax else if
To add a second condition in CES, use the keyword else if after an if block. It will only execute if the previous condition is false and the new condition is true.
Syntax else
To execute a block of code when none of the previous conditions are true, use the keyword else.
Loop syntax
Syntax while
To execute a block loop when the condition is true, use the keyword while.
Syntax for
To execute a block of code for a specific number of iterations, use the keyword for.
Functions syntax
Syntax func
To reuse a block of code several times without needing to rewrite it, use the keyword func.
Classes syntax
Syntax class
To create a structure that defines a type of object, grouping data (variables) and behaviors (functions/methods) use the keyword class.