「Swift」配列の要素を変更するサンプル

サンプルコード

var cityArr = ["Tokyo", "Oosaka", "Fukuoka"]
cityArr[1] = "Nagoya"
cityArr[2] = "Yokohama"
 
print(cityArr[1]) 
print(cityArr[2])

 

Swift

Posted by arkgame