Swift: Variables

This entry is part 1 of 41 in the series Swift

Apple introduced a new and aptly named Editor called Playground and this editor allows us to look at the output almost immediately on the right-hand side of the editor.

We will use the Playground for this series of tutorial.  This is a quick run through of Swift code and syntax.

Defining variables in Swift:

//: Playground - noun: a place where people can play

import UIKit

var str = "Hello, playground"
print(str)

var int = 10
print(int)

var dec = 10.511
print(dec)

swift1

Series Navigation
Swift: Specifying the type of variables >>