【发布时间】:2016-12-10 09:46:36
【问题描述】:
我有这种形式的数据[1,2,3,4]。我想在这个数组上执行一些操作,这样我就会得到这样的输出[1,2,3,4, 4,3,2,1, 1,2]。拜托,你能给我一些方法来实现这个输出吗?
// function declaration
function arrayExm(array,limit){
// want some operations here so that i will get this output
}
//function execution
arrayExm([1,2,3,4],10)
//so it will return [1,2,3,4, 4,3,2,1, 1,2]
【问题讨论】:
标签: javascript arrays limit