我试图在Gruntfile.js中创建一个函数来将模板文件复制到我的项目中,使用循环和.json文件来“自动”复制作业,显然这个函数看起来很棒,因为Grunt根据.json文件中的记录数运行复制作业,使用循环footer", "number": 2}, ]}copycores[core].name);
g
我有这段代码,它改变了原始的数组arr,即使我把它复制到一个名为copy的变量中。//step 1 go through array and find the shortest // make copy of arr notto affect it console.log(copy);
//[ 'codewars