add some new fun

This commit is contained in:
jiaming 2018-12-22 20:56:01 +08:00
parent f57675006a
commit 13a25379a5
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ export function multipleSum (...num) {
export function filterNull (arr) { export function filterNull (arr) {
const tmpArr = [] const tmpArr = []
arr.forEach(v => (v && tmpArr.push(v))) arr.forEach(v => ((v || v === 0) && tmpArr.push(v)))
return tmpArr return tmpArr
} }