编辑代码

var myString = "Hello world!     -  swift.jsrun.net"
print(myString)
print("Hello,world")
var myVariable = 42
myVariable = 50
let myConstant = 42


let implicitInteger = 70
let implicitDouble = 70.0
let explicitDouble: Double = 70



let label = "the width is"
let width = 94
let wwidthLabel = label + String(width)


let apples = 3
let oranges = 5
let applesSummary = "I have \(apples) apples."
let fruitSummary = "I have \(apples + oranges) pieces of fruit."



var shoppingList = ["catfish", "water", "tulips", "blue paint"]
shoppingList[1] = "bottle of water"

var occupations = [
    "Malcolm": "Captain",
    "Kaylee": "Mechanic",
]
occupationns["Jayne"] = "Public Relations"


let emptyArray = [String] ()
let empyDicyionary = [String: Float]


shoppingList = []
occupations = [:]