Join Harrison Ferrone for an in-depth discussion in this video Our first function, part of Learning Swift 3 for Developers.
- [Instructor] We're finally ready to tackle…some basic functions.…I'm going to close out of Chapter Five.…We go up to File, New, Playground.…And I'm going to name our new playground Ch6_Functions.…Hit Next, make sure Swift3ForDevelopers…is our Save destination, and hit Create again.…You know the drill by now.…Delete the comment, and the default string,…and let's add some of our own.…
Chapter Six Functions, Closures, and Associated Types.…For this video, we're going…to add a header called Our First Function.…Here we're going to write a few variations…of the same simple function…which will just give us a print statement.…To write a function, we need the func keyword.…We're going to name this CurrentDate,…opened and closed parentheses,…and opened and closed curly braces.…
Inside, we're just going to have a print statement…that says, "It's 3/21/2017."…We call the function…by saying CurrentDate opened and closed parentheses.…I'm going to expand the right side of my editor…and there we go.…Now, let's try adding an input parameter.…
- 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?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
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.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.