The if statement is used to execute some code only if a specified condition is true. ... Example.
www.w3schools.com