Updated for Xcode 14.2
We’ve covered a lot about the basics of data in the previous chapters, so let’s recap:
let
, and variables using var
.let
so that Swift can help you avoid mistakes.count
and uppercased()
.isMultiple(of:)
.Double
, short for double-length floating-point number. That means they can hold very large numbers if needed, but they also aren’t 100% accurate – you shouldn’t use them when 100% precision is required, such as when dealing with money.+
, -
, *
, and /
, along with the special compound assignment operators such as +=
that modify variables directly.!
operator or by calling toggle()
.It’s a lot, right? And that’s okay – you’ll be using everything from that list time and time again as you build apps, until eventually you’ll understand it all without needing to refer back here.
SPONSORED From March 20th to 26th, you can join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer!
Sponsor Hacking with Swift and reach the world's largest Swift community!
Link copied to your pasteboard.