If there’s one line from Shakespeare’s Hamlet that most people know, it’s “to be or not to be, that is the question.” Shakespeare meant that as the ultimate question of life or death, but it just so happens that Hamlet strikes right at the heart of logic in programming: evaluating whether a condition is true or not.
Today we’re going to get into the real detail of Swift: operators and conditions, which let us evaluate our program’s state as it runs and take different action depending on the result. There are several ways of doing it and you’ll need them all, but we’ll walk through them step by step so you can see how they compare.
Today you have four tutorials to work through, where you’ll meet things like
switch, and more. Once you’ve watched each video and optionally gone through the extra reading, there’s a short test to help make sure you’ve understood what was taught.
Do you remember the two rules of this series? You’re already being awesome at the first one because you keep coming back for more (you rock!), but don’t forget the second: post your progress online, so you can benefit from all the encouragement.
Hit Send below to start a virtual conversation with me.
Need help? Tweet me @twostraws!
SPONSORED Fernando's book will guide you in fixing bugs in three real, open-source, downloadable apps from the App Store. Learn applied programming fundamentals by refactoring real code from published apps. Hacking with Swift readers get a $10 discount!
Link copied to your pasteboard.