var a = [0, 2, 3, 4];
a = a.map(function (i) {
return i + 1;
}).filter(function (i) {
console.log(i)
return i % 2 != 0;
});
console.log(a); //3,5
原文地址:https://www.cnblogs.com/rockyan/p/8573736.html
时间: 2024-10-08 22:28:20
var a = [0, 2, 3, 4];
a = a.map(function (i) {
return i + 1;
}).filter(function (i) {
console.log(i)
return i % 2 != 0;
});
console.log(a); //3,5
原文地址:https://www.cnblogs.com/rockyan/p/8573736.html