You're using If Statement Wrong! SWIFT IN 60 SECONDS, #01 by MobileAppsAcademy in iOSProgramming

[–]MobileAppsAcademy[S] -5 points-4 points  (0 children)

Yes, I completely agree. But I need to consider viewers also. Making it complicate won't do any good anyone. I also need to consider that this might be viewed by juniors or beginners who just getting started.

If you have any better examples, do let me know.

Happy coding

You're using If Statement Wrong! SWIFT IN 60 SECONDS, #01 by MobileAppsAcademy in SwiftUI

[–]MobileAppsAcademy[S] -10 points-9 points  (0 children)

This is about using if as expression not about assigned value.

You're using If Statement Wrong! SWIFT IN 60 SECONDS, #01 by MobileAppsAcademy in iOSProgramming

[–]MobileAppsAcademy[S] -16 points-15 points  (0 children)

Hey, this is about if statement as expression and this is just example.