//: Playground - noun: a place where people can play import UIKit var str = "Hello, playground" var array = ["A", "B", "C", "D", "E", "F"] let arrayCount = array.count array.isEmpty arr…
//: Playground - noun: a place where people can play import UIKit // 拼接 var str = "Hello, playground" str + "hello, swift" // 这样的拼接, str还是没有改变 str str += "hello, swift" str // 比较 var c1 = "abc" var c2 = "abd&qu…
//: Playground - noun: a place where people can play import UIKit var dict = [1:"one", 2:"two", 3:"three", 4:"four"] dict.count dict.isEmpty dict[1] dict[66] "课程名称: " + dict[1]! // 添加和修改 dict[5] = "fi…
JS数组的基础操作代码: <script type="text/javascript"> 数组的三种定义 var arr1 = new Array(); var arr3 = Array(1,2,3.5,4,'5',false); var arr2 = [1,2,3,4,'5',"aa",true]; var i; var arr4 = []; arr4[3] = 12; arr4…