Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
hi bridgecoder, Swift has a concept called optionals. These are used when an object may or may not exist. For example, if I try to initialize a digit with a string that contains an Int (like this: Int("5")), everything is fine. However, if I try to use an invalid string (like this: Int("Cow")), Swift can't make an integer out of it so it returns nil. Because this initializer might return nil, it is optional. Swift can't make a comparison on an optional object. We have to "unwrap" it and see if a value exists or not. There are several ways to unwrap an optional in Swift. The least safe way is to force unwrap it using "!". The "!" in this context is basically saying that you guarantee the optional will have a value and not nil. If it doesn't have a value, your program will crash.