If Statement
A statement that evaluates a condition before executing some code.
What is an if statement?
A statement that evaluates a condition before executing some code.
if(age > 21) {
// add one or more statements here
price = 19.99;
}
// statements with a single line of code
// can be written like this
if(age > 21) price = 19.99;
Level: Novice · More C# terms at this level
Updated