How would I combine two arrays in Objective-C?

后端 未结 3 1341
自闭症患者
自闭症患者 2021-01-31 01:00

What is the Objective-C equivalent of the JavaScript concat() function?

Assuming that both objects are arrays, how would you combine them?

3条回答
  •  抹茶落季
    2021-01-31 01:58

    For Swift version its like charm :

    let a = [1,2,3]
    let b = [3,4]
    let c = a + b
    print(c)
    

提交回复
热议问题