Swift BasicsLesson 6Free preview
Swift Output
This lesson is part of Swift · All levels
Summary
This lesson reviews the print() function in Swift to display data to the debugging console window. Developers will study the optional parameters of the separator and terminator at print(), as well as the technique of interpolating the string using the syntax '\(expression) ' to combine text with variable values concisely.
Key points
- The 'print()' function prints a text representation to the Xcode console window
- By default, print() adds the character newline (newline) at the end
- The separator parameter sets the value separator and the terminator sets the closing character.
- String interpolation is written with the notation '\(variable) ' in the quotation marks
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.