Published: 25 Jan 2019 › Updated: 25 Jan 2019![[Grammer] 05 - Variables and Constants](/nhc-explorer-cover.webp)
![[Grammer] 05 - Variables and Constants](/nhc-explorer-cover.webp)
[Grammer] 05 - Variables and Constants
- Variables(변수) : Keyword, Identifier, Type, Initial Value 등을 이용함.
var variableName = initialValue
var name = "James"
var year = 2017
var swiftVersion = 4.0
var isMale = true
- Constants(상수) : 값을 변경 할 수 없음.
let variableName = initialValue
let name = "James"
let year = 2017
let swiftVersion = 4.0
let isMale = true
// year = 2019 << ERROR
- Type Annotation: 자료형을 직접 지정하는 것
// var variableName: typeName
var name: String
name = "Geonhwi"
Leave [Grammer] 05 - Variables and Constants to:
Read more #swift4 posts
Best Posts From gunw
We have not curated any of gunw's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From gunw
- [Grammer] 26 - Custom Operators
- [Grammer] 25 - Operator Methods
- [Grammer] 23 - Bitwise Operators, 24 - Identity Operator
- [Grammer]21 - Ternary Coditional Operator, 22 - Range Operators
- [Grammer] 19 - Short-circuit Evaluation, Side Effect, 20 - Assignment Operators
- [Grammer] 16 - Overflow Operators, 17 - Comparison Operators, 18 - Logical Operators
- [Grammer] 13 - Data Types with Memory, 14 - Operator Basics, 15 - Arithmetic Operators
- [Grammer] 11 - Type Inference, Type Safety, 12 - Type Conversion, Type Aliases
- [Grammer] 09 - Boolean, 10 - Strings and Characters
- [Grammer] 07 - Naming Convention, 08 - Numbers