Syntax

Swift Print Output Syntax

In Swift, print output: prints a line — print("Hello")

Quick Answer

Syntax
print("Hello")
SwiftSyntax

Print Output

Code example
print("Hello")

Prints a line.

Learn More

How to print output in Swift

  1. Open your Swift file or editor.
  2. Copy the example, then replace its sample names and values for your code.

Swift Print Output Syntax

Use print("Hello").

Related Syntax References

Frequently asked questions

What is the Swift syntax for print output?

Use this pattern: print("Hello")

Can I copy this Swift code example?

Yes. Use Copy code and adapt the example to your program.

Is this Swift syntax different on Mac or Windows?

No. The language syntax is the same across operating systems.

Official source · How we verify