Chapter 4 : Variables
A variable is a storage location which contains some known or unknown quantity or information, a value. The variable name is the way to reference the stored value.
var myVariable = 100
//
// main.swift
// Swift Tutorials 2014-15
// Variables in Swift
//
//
// Created by Code2care on 15/09/14.
// Copyright (c) 2014 Code2care. All rights reserved.
//
//integer
var a = 10
//float
var b = 10.10
//String
var c = "Hello, World!"
//Prints a b c variable values
println("\(a) \(b) \(c)");
//
// main.swift
// Swift Tutorials 2014-15
// Variables in Swift
//
//
// Created by Code2care on 15/09/14.
// Copyright (c) 2014 Code2care. All rights reserved.
//
//integer
var a = 10
println("Value of a : \(a)");
var a = 59
println("Value of a : \(a)");
//
// main.swift
// Swift Tutorials 2014-15
// Variables in Swift
//
//
// Created by Code2care on 15/09/14.
// Copyright (c) 2014 Code2care. All rights reserved.
//
//integer
var a = 10, b = 20, c = 30
println("Value of a : \(a)");