Join Harrison Ferrone for an in-depth discussion in this video Array syntax, part of Learning Swift 3 for Developers.
- [Instructor] I'm going to close out chapter two,…and start a new playground.…Go up to the Xcode nav bar, select file, new playground.…Name this chapter three underscore collections.…And hit next, make sure that Swift 3 for Developers…is the folder we're saving it in, and hit create.…Like we've done before, delete the comment,…and the default string, let's add some comments of our own:…backslash star chapter three…collections, tuples and enumerations.…
Underneath the import statement, let's add one more comment.…We'll call this array syntax.…Array is like the other variable types we've looked…at so far, our type safe, meaning the compiler,…won't let you put values of different types…into the same array.…You can also use the var or let key words…to make them mutable or constant.…Let's start by declaring an empty array…that only accepts floats: var array of floats…equals we're going to use bracket float…close bracket open and close parenthesis.…
We can also declare an empty array by using var,…we're going to call it another float array colon…
- Starting a new playground
- Printing to the console
- Declaring variables
- Working with numbers
- Using strings
- Breaking down optionals
- Understanding closures
- Classes vs. structs
- Extensions and protocols
Skill Level Beginner
1. Hello Swift
2. Back to Basics: Variables and Operators
3. Collections, Tuples, and Enumerations
4. Working with Logic Flows
5. Only in Swift: Optionals
6. Functions, Closures, and Associated Types
7. Classes vs. Structs
8. Advanced Topics
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.