Skip to content

Commit 2a23af7

Browse files
committed
add constants code
1 parent 312916f commit 2a23af7

File tree

6 files changed

+15
-6
lines changed

6 files changed

+15
-6
lines changed

Swift Language/Variables and Constants/Variables.playground/Contents.swift renamed to Swift Language/Variables and Constants/Variables 1.25.11 AM.playground/Contents.swift

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
2-
var firstName = "Abdullah"
1+
// Variables
2+
var firstName = "Abdullah", secondName = "Sami"
33
firstName = "Omar"
44

55
var middleName : String
@@ -17,10 +17,19 @@ var z : Double = 2.674365437289
1717
lastName = "Ali"
1818
print(middleName + " " + lastName); print(z)
1919

20+
var hasCar = true
21+
hasCar = false
22+
23+
var hasHouse : Bool
24+
hasHouse = true
25+
26+
27+
// Constants
28+
let age = 20
2029

21-
let tax = 0.05
30+
let tax : Float = 0.05
2231

23-
let age :Int
24-
age = 22
32+
let hasPhone : Bool
33+
hasPhone = true
2534

26-
let nationality:String = "Saudi"
35+
print(hasPhone)

0 commit comments

Comments
 (0)