A concise Swift playground exploring array properties and methods — append, remove, sorted, contains, firstIndex.
-
Updated
Jul 2, 2026
A concise Swift playground exploring array properties and methods — append, remove, sorted, contains, firstIndex.
A concise, runnable Swift Playground demonstrating how to force unwrap optionals in Swift.
Swift Playground demonstrating the self keyword to disambiguate properties inside struct initializers.
A concise Swift Playground demonstrating protocols: parameter types, struct conformance, inheritance, and methods.
A concise, runnable Swift playground demonstrating access-control levels (private, public) on a struct.
A concise, runnable Swift example demonstrating struct initializers, memberwise init, custom init, and extensions.
A concise, runnable Swift Playground demonstrating failable initializers (init?) in Swift
A concise, runnable Swift playground demonstrating the nil-coalescing operator (??) with a fallback example.
Swift playground demonstrating implicitly unwrapped optionals (Type!) and the nil-access caveat
A concise Swift playground demonstrating for-in, while, and repeat-while loops — a beginner learning example.
A concise, runnable Swift playground demonstrating optional chaining (the ? operator)
A concise, runnable Xcode Playground demonstrating Swift enums — simple cases and associated values.
A concise, runnable Swift Playground demonstrating optional unwrapping with guard let
A concise, runnable Swift Playground demonstrating static (type) properties in a struct.
A concise, runnable Swift Playground demonstrating optional types and nil handling in Swift
A concise Swift Playground demonstrating computed and stored properties.
A simple swift task that returns the second smallest element in an array
Add a description, image, and links to the swift-basics topic page so that developers can more easily learn about it.
To associate your repository with the swift-basics topic, visit your repo's landing page and select "manage topics."