fix: fix typo in examples
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// When you need to check some value
|
||||
// a conditional statements might help you
|
||||
// a conditional statement might help you
|
||||
|
||||
int valueToCheck = 2 + 2;
|
||||
if (valueToCheck == 4)
|
||||
@@ -7,7 +7,7 @@ if (valueToCheck == 4)
|
||||
printline("Yay! 2 + 2 = 4");
|
||||
}
|
||||
|
||||
// Conditional statement uses condition in pairs
|
||||
// Conditional statement uses condition in parenthesis
|
||||
// after `if` keyword and executes command(s) after
|
||||
// if condition turns out to be true
|
||||
|
||||
@@ -21,7 +21,7 @@ if (age <= 20)
|
||||
else
|
||||
{
|
||||
age = 20;
|
||||
printline("You looks too young!");
|
||||
printline("You look too young!");
|
||||
}
|
||||
|
||||
// NOTE: If you need to execute only one statement
|
||||
|
||||
Reference in New Issue
Block a user