js中的数组推导

js中的数组推导

数组推导是从python中借用过来的概念,功能是用另外一个数组或者可迭代对象来初始化数组元素。一般语法:[expression for (variable in object) if (condition) ]大致相当于 只是从
JavaScript90