Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

An if-else statement is a programming conditional statement that runs a different set of statements depending on whether an expression is true or false.

For a general example of an if-else statement, not specific to any particular programming language, see "What is an if else".

history | excerpt history