I'm trying to push array type object to special index inside array in new Swift lang by Apple. It should look like this = [ [...], [...], ...]
, as I've read in the docs - NSMutableArray
type is assigned to variable automatically if it's var
, but even in playground it throws me errors:
var arr = [];
arr[0] = []; // Error: cannot assign to result of this expression
arr.insert([], atIndex:0) // Error: 'NSArray' does not have member named 'insert'
var array2d: [[Int]] = [[1,2,3,4],[5,6,7,8]]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With