1、遍历ArraryInt的几种方法for(item: Int in array){}for(index: Int in arrary.indices){}for((index, value) in arrary.withIndex){} 2、when关键字使用方法:when() {“xxx” -> return xxx“xxy” -> return xxx“xxz” -> return xxxesle -> return xxx}