注:判断是否为奇数的特征是查看是否能被2整除; filter:是去掉无用的数 var arr = [1,2,3,5,6,7,8] var qi = arr.filter(function(x){ return x%2 !== 0 }) alert (qi)//1,3,5,7