Integer
Whole numbers
Floating points
Decimal numbers
Doubles
Decimal numbers with higher precision
Strings
Characters and Text
Booleans
True / False
Saving = Persistence
JSON => JavaScript Object Notation
Bool
Integer & Floating-Point numbers
String
Array
Dictionary <String, Any>
Data: Encoded using Strings
Date: ???
Integers are precise numbers.
Double Formats are not as precise as Integers. They have a little bit of inaccuracy.
Swift will not allow implicitly calculating Integers and Doubles together for the sake of type safety. So we should choose one of the number formats.
https://www.hackingwithswift.com/quick-start/beginners/how-to-store-decimal-numbersarrow-up-right
Last updated 3 years ago