For-In Loops multiple conditions

前端 未结 5 1966
礼貌的吻别
礼貌的吻别 2021-01-18 02:34

With the new update to Xcode 7.3, a lot of issues appeared related with the new version of Swift 3. One of them says \"C-style for statement is deprecated and will be remove

5条回答
  •  不知归路
    2021-01-18 02:46

    Here’s a simple solution:

    var x = 0
    while (x < foo.length && x < bar.length) {
    
      // Loop body goes here
    
      x += 1
    }
    

提交回复
热议问题