【发布时间】:2013-05-14 23:08:27
【问题描述】:
给定两个数组,如何将两者的组合传递给函数,最好使用内联语法?
var current = [1.01, 3.01, 2.42, 4.31];
var preview = [0.89, 3.15];
/*
* pass both combined to a function, this is fictional syntax.
* display(current + preview);
*/
我所说的内联语法的意思是创建一个被传递的临时数组。我不想修改我的数组之一。
【问题讨论】:
-
什么是内联语法?
-
@BoltClock 我更新了问题来解释这一点。
标签: javascript arrays syntax operators