- Mastering macOS Programming
- Stuart Grimshaw
- 28字
- 2021-07-02 22:54:15
Printing to the console
Swift's print() command automatically calls an object's String representation, so these last two lines of code are equivalent:
let age = 6
print("\(age)")
print(age)