Language
Version: 4
Categories
-
User Program Communication
-
Variables
-
Control Flow
-
Functions
-
Object Oriented Programming
User Program Communication
Print in Swift
Printing is used to output text directly to the console.
Syntax
print("Place a string here, and a variable \(here))"
Notes
All non-string variables will be converted to string automatically.
Example
let name = "Chris"
print("Hello, \(name)!") //should print "Hello, Chris!"