Join Harrison Ferrone for an in-depth discussion in this video Print to the console, part of Learning Swift 3 for Developers.
- [Harrison] Even though we haven't covered…how to write anything in Swift yet,…it's important to know how to properly comment…and print to the console…before we get into the language syntax.…Underneath all our comments, make some room.…We're going to create a simple variable.…Start with the var keyword,…and we're going to name it testPrint.…We're going to give it a simple string value,…"And we're rolling."…Now you'll see your string in the right-hand of the editor…but it's not actually printed out yet.…To do that, we need to use the print function.…
Right, print, and for the items, pass in testPrint.…Make sure to close the parenthesis.…Now take a look at the debug console…at the bottom of the screen,…and you'll see our message,…"And we're rolling," printed out.…That's all there is to it.…We'll take a look at Swift operators up next.…
- 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.