Chapter 5 Decision making

It is not rare that we wish to conditionally perform operations - or in other words, to perform different operations depending on the outcome of a test of desired conditions.

We can use if() {}, if() {} else {} and ifelse() to help us with this selection process.