I started to learn Swift today, and the learning time was late, so I started to learn the simplified version directly. The article only recorded the knowledge points. Those who have the basic knowledge can start with the passage quickly

**1, basic data types: Int, Float, Double, Bool, Character, String **

The assignment does not use the suffix “;”. End, the string prefix does not need to be decorated with “@”

2, ** variable var (can be modified again), constant let (cannot be modified again) **

3, type inference: no need to assign variable type, SWIFT automatically infer type, cannot change the type, will report an error

As shown in the following figure, Swift automatically infer that the type is String. In this case, an error is reported when reassigning an Int type

4, determine the data type method:

Output result:

Out of bounds… The rest in the next issue…