Example
Add an Example
callout to a playground using the Example delimiter.
Works with:
✓ Playgrounds
Symbol documentation
Syntax
* | + | - Example: description
optional continuation of description
Example
/*:
- Example: *A simple `for` loop.*\
This example shows a `for` loop that prints the numbers 1 to 5.\
\
`for index in 1...5 {`\
` print("index = \(index)")`\
`}`}
*/
Copyright © 2018 Apple Inc. All rights reserved. Terms of Use | Privacy Policy | Updated: 2017-06-05