Reading view

There are new articles available, click to refresh the page.

苹果现在 bug 越来越多的原因找到了

qdwang:

这里大家都是程序员,只要做完这个题,就知道为什么苹果会有那么多 bug 了

// 这是一段 swift 代码

var hello = [10, 20, 30, 40, 50, 60]
var foo = hello[2..<5] // 表示索引范围是 2 ,3 ,4
foo[2] = 0
print(foo) 

// 先看看你的程序员直觉,输出结果是什么

然后随便 google 找个 swift playground 运行这段代码,你就知道为什么苹果现在 bug 越来越多了。

❌