خرید بک لینک

Vote count: 0

var array:[Int] = []
var index = 5

if array[index] == nil {
    array[index] = 1
}

Currently Xcode states that an int can not take the value of nil. So this code doesn't work. Is there any way to produce the same effect or verifying if a specific index is empty?

asked 2 mins ago

برچسب: نویسنده: استخدام کار تاريخ: چهارشنبه 12 خرداد 1395 ساعت: 5:54

صفحه بندی