【发布时间】:2015-10-28 14:53:31
【问题描述】:
有没有一种方法(就像我们在 C# generics/linq list.take... 中所使用的那样)可以在调用函数时在参数中获取数组的一系列元素,而无需创建新数组?
//a simple array with some elements
myArray;
//just to show what I mean...pass the first five elemtns of array to the function
doSomethingWithArray(myArray[0,4]);
function doSomethingWithArray(items) {
//do stuff
}
【问题讨论】:
标签: javascript qml qt5 qtquick2