Friday Discount - Lifetime Access for $20!!!! - Click Here!

Ternary Conditional Operators in Swift

Ternary Conditional Operators in Swift 2 (Episode 28)
May 24, 2016 Justin

Ternary Conditional Operators in Swift 2.2 (CartoonSmart Video Tutorial Podcast 28)

Watch Fullscreen

This video tutorial we’ll talk about how to shorthand some if…else statements with the ternary conditional operators. With a bool variable you can quickly make a value equal something based on two conditions. For example… let someVar = question ? answer1 : answer2 , where question is a bool variable.

This video is from CartoonSmart’s Video Tutorial Podcast, so keep in mind, this is partly just for fun. We keep things light. Subscribe to our podcast on iTunes or through your favorite RSS reader at or check out our more serious tutorials by visiting the main page at

Hosts: Justin Dike, Clevon O’Doul



Subscribe to this Podcast on iTunes


Know what an affiliate program is? You make money just by sharing links to our site! Win. Win.

Earn when you refer any buyer here! 30 day tracking. Commissions are 33%-50% and recur on subscription products!