/**
* Copies the values of `source` to `array`.
* 将“source”的值复制到“array”
* @private
* @param {Array} source 要从中复制值的数组.
* @param {Array} [array=[]] 要将值复制到的数组.
* @returns {Array} 返回数组.
*/
function copyArray(source, array) {
let index = -1;
const length = source.length;
array || (array = new Array(length));
while (++index < length) {
array[index] = source[index];
}
return array;
}
export default copyArray;
-
由 钟是志 提交于
并把辅导员 全部改成班主任
4a68bae9