Embed presentation
Download as PDF, PPTX




![Type Safe
var a: Int = 1
var b: Double = 1.1
var c: [Int] = [1, 2, 3]
var d: String = “hello”
var e: Int = 1.1 // error](https://image.slidesharecdn.com/swiftbasic-1-160306072125/75/Swift-Tutorial-1-5-2048.jpg)






![Exercise
// print “Hello, [name]” if
name not nil, else print
“Hello there.”
var name: String?](https://image.slidesharecdn.com/swiftbasic-1-160306072125/75/Swift-Tutorial-1-12-2048.jpg)

The Swift tutorial document provides an overview of the Swift programming language, covering basic syntax like printing, variables, constants, types, optionals, and control flow. It demonstrates Hello World code, shows the differences between variables and constants, examples of type safety and inference, and how to handle optional values using if let. The document aims to introduce Swift's core features through short code snippets and explanations.




![Type Safe
var a: Int = 1
var b: Double = 1.1
var c: [Int] = [1, 2, 3]
var d: String = “hello”
var e: Int = 1.1 // error](https://image.slidesharecdn.com/swiftbasic-1-160306072125/75/Swift-Tutorial-1-5-2048.jpg)






![Exercise
// print “Hello, [name]” if
name not nil, else print
“Hello there.”
var name: String?](https://image.slidesharecdn.com/swiftbasic-1-160306072125/75/Swift-Tutorial-1-12-2048.jpg)