While I am not new to programming, I am quite new to the Swift language. I am using the Swift Playground app on macOS 26 on an M1 MacBook Air.
I am on the lesson about types. Perhaps it's a silly question, but what is a portal? It is never described or pointed out where to find it in the puzzle world. Similarly, the instructions reference a "switch" object without ever defining what it is. I cannot write code to call methods or set properties on objects about which I have no useful information. Can anyone advise, please?
Thank you kindly.
For context, I’m using Swift Playground 4.6.4 on macOS 15.6.1. It has two lessons:
- Learn to Code 1
- Learn to Code 2
Your reference to the Types lesson indicates you’re doing Learn to Code 2. Types > Introduction > page 8 introduces the concept of portal, indicating that they’re part of the puzzle world. That concept was introduced in Learn to Code 1 > Commands > Portal Practice. Likewise the concept of switch is in Learn to Code 1 > Commands > Toggling a Switch.
I cannot write code to call methods or set properties on objects about which I have no useful information.
If you’re asking questions like this then I suspect that Learn to Code isn’t really for you. You might be better off starting with The Swift Programming Language, using a general playground, or a playground in Xcode, to play with the many examples it contains.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"