Back to Developer Roadmap

Comments in Swift

src/data/roadmaps/swift-ui/content/[email protected]

4.0803 B
Original Source

Comments in Swift

Comments in Swift are notes within your code that the compiler ignores. They're used to explain what the code does, making it easier for you and others to understand. You can create single-line comments using two forward slashes //. Anything after // on that line will be treated as a comment. For multi-line comments, you can use /* to start the comment and */ to end it. Everything in between /* and */ will be ignored by the compiler, allowing you to write longer explanations or temporarily disable blocks of code.

Visit the following resources to learn more: