5-Day Swift Coding Challenge: Day 1

May 5 2025 · Swift 6.0, iOS 18, Swift Playground 4.6

Lesson 01: Day 1: Meet the Swift Programming Language

Demo: Objects in Swift

Episode complete

Play next episode

Next

Heads up... You’re accessing parts of this content for free, with some sections shown as obfuscated text.

Heads up... You’re accessing parts of this content for free, with some sections shown as obfuscated text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

Open the demo from the previous playground. You’ll be continuing from where you last left off. Objects are everywhere in Swift. In fact, you’ve already been using objects since the very beginning. All those variables are instances of objects.

myInt.
10.
var fullName = firstName + " " + lastName
print(fullName.lowercased())
class TrafficLight {
  func display() {
    print("🟧🟧🟧")
    print("🟧🔴🟧")
    print("🟧🟡🟧")
    print("🟧🟢🟧")
    print("🟧🟧🟧")
  }
}
var light = TrafficLight();
light.display()
light.display()
light.display()
See forum comments
Cinema mode Download course materials from Github
Previous: Working with Objects Next: Conclusion