Open alonso123qwe opened 2 years ago
const arr = [-10, 0, 10, 21, 0, -7, 35, 7, 9, 23, 18] let arr2 = [] arr.map(item =>{ if(item>0){ arr2.push(item) } }) let num = Math.min.apply(null,arr2) console.log(num)
const arr = [-10, 0, 10, 21, 0, -7, 35, 7, 9, 23, 18] let arr2 = [] arr.map(item =>{ if(item>0){ arr2.push(item) } }) let num = Math.min.apply(null,arr2) console.log(num)