LoginSignup
9
8

More than 5 years have passed since last update.

Swiftでmutable arrayにできないとき

Posted at

格納するオブジェクト型を指定しないとimmutableなarrayになるらしい。

let array0 = [] // immutable
var array1 = [] // immutable
var array2 = ["1", "2"] //mutable
var array3: String[] = [] // mutable
9
8
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
8