Created
June 4, 2020 15:09
-
-
Save liamnichols/79d574d9776d02a1a4ab5f0123db431c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/spec/fixtures/SwiftFile.swift b/spec/fixtures/SwiftFile.swift | |
index 0e18440..9dda539 100755 | |
--- a/spec/fixtures/SwiftFile.swift | |
+++ b/spec/fixtures/SwiftFile.swift | |
@@ -10,10 +10,33 @@ module Danger | |
// Hello, World! Program | |
import Swift | |
var tempString: String? = "Hello, World!" | |
print(tempString!) | |
+ var shoppingList = ["catfish", "water", "tulips"] | |
+ shoppingList[1] = "bottle of water" | |
+ | |
+ var occupations = [ | |
+ "Malcolm": "Captain", | |
+ "Kaylee": "Mechanic", | |
+ ] | |
+ occupations["Jayne"] = "Public Relations" | |
+ | |
+ shoppingList.append("blue paint") | |
+ print(shoppingList) | |
+ | |
+ let individualScores = [75, 43, 103, 87, 12] | |
+ var teamScore = 0 | |
+ for score in individualScores { | |
+ if score > 50 { | |
+ teamScore += 3 | |
+ } else { | |
+ teamScore += 1 | |
+ } | |
+ } | |
+ print(teamScore) | |
+ | |
var total = 0 | |
for i in 0..<4 { | |
total += i | |
} | |
- print(total) | |
+ print("Total:", total) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment