Swift: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 9: | Line 9: | ||
*Str | *Str | ||
*Bool | *Bool | ||
=Control= | |||
==If Statements== | |||
No surprises | |||
<syntaxhighlight lang="swf"> | |||
if a < 4 { | |||
print("we are here 1") | |||
} | |||
else if { | |||
print("we are here 2") | |||
} | |||
else { | |||
print("we are here 3") | |||
} | |||
</syntaxhighlight> |
Revision as of 23:58, 23 June 2022
Introduction
Here is my first dip into Apple and swift Swift Cheat Sheet
Data Types
Here we have the following Primatives
- Int
- Float
- Double
- Str
- Bool
Control
If Statements
No surprises
if a < 4 {
print("we are here 1")
}
else if {
print("we are here 2")
}
else {
print("we are here 3")
}