Xcode 6 MyPlayground
Xcode 6 有個新玩意MyPlayground
好奇寶寶來試試看XDDDD
好像滿好玩的
變數形態用var
沒有用分號(;)做程式的結尾~
寫程式真開心~哈哈哈哈哈
// Playground - noun: a place where people can play
import UIKit
var str = "Hello, playground"
var msg = "Hello World!"
var x = 2
var y = 3
var z = 4
var sum = x + y + z
println(msg)
println(sum)
if( sum >= 10 )
{
println("sum >= 10")
}
else
{
println("sum < 10")
}