How to use the Ternary Operator in Swift! 60 seconds

preview_player
Показать описание
This video will show you exactly how to use the ternary operator in Swift, in 60 seconds, while showing exactly how it relates to an if else statement.

For extra info about this topic, and some behind-the-scenes stuff about this video, keep an eye on my Patreon, here:

For a good time:

📙 Get a FREE SwiftUI book from my friend (partner link):

#iOScompressed #iOSdev #SwiftLang
Рекомендации по теме
Комментарии
Автор

I've been working on a problem from Lambda all day and couldn't figure this out. I watched this video twice and solved the problem in 30 seconds. THANK YOU Scott!

iamblacksheep
Автор

A Beautifully Simple Explanation 👌🏽 thanks 😎

byaruhaf
Автор

I really like this style, very quick, to the point a friendly. sometimes you just need that.

neat trick with the post production on the reveal of the 2 variables - we don't need to watch you type, but also some other tuts fast forward too fast and it can bamboozle - nail on the head, and i appreaciate you put that extra effort in for less that a second of video time

subbed, and i recommended to a friend working on the topic

bikethiefmedia
Автор

I think I got basic concept of ternary operator! Thanks! 👍👍👍

neimsaci
Автор

They’re even cooler when you assign a value to a variable using a ternary operator: var someString = (askTrueFalseQuestion) ? “Yes” : “No”

nitramluap