12345678910111213 import UIKit//type inference - 타입형을 알아서 판단함var str = "Hello, playground"var version = 1.0 //변수(var)let year = 2015 //상수(let) : 값을 바꿀 수 없음let handsome = true//타입형을 직접 씀var str2:String = "Hello, playground"var version2:Double = 1.0let year2:Int = 2015let handsome2:Bool = true
'프로그래밍 > Swift | iOS' 카테고리의 다른 글
[Swift3 & iOS10] function (0) | 2017.12.01 |
---|---|
[Swift3 & iOS10] 조건문 if,switch (0) | 2017.12.01 |
[Swift3 & iOS10] 반복문 for,while (0) | 2017.11.30 |
[Swift3 & iOS10] Dictionary (0) | 2017.11.30 |
[Swift3 & iOS10] Array (배열) (0) | 2017.11.30 |