Control statements are an essential part of programming languages and play a crucial role in determining the flow of execution in a program. The "if" statement allows programmers to specify a condition that, if true, will execute a block of code. if the if condition is false then else block is executed
if (condition) {
// code block to be executed if the condition is true
}
else{
// code block to be executed
}
if (x > 5) {
// code to be executed if x is greater than 5
// code to be executed if the condition is true
}
else{
// code to be executed if x is less than 5
// code to be executed if the condition is false
}