Recent | Popular
#function #symbol #param
function getTotal(list, dir) { // where if dir is equal to either '>' or.'<' return list .filter(item => (dir === '<' ? item < 0 : item > 0) && item) .reduce((total, item) => (total += item), 0); }
Wed Jun 26 2024 02:40:48 GMT+0000 (Coordinated Universal Time)