Plus Minus

  • + 0 comments

    typescript/javascript

    console.log((arr.filter(el => el > 0).length/arr.length).toFixed(6)); console.log((arr.filter(el => el < 0).length/arr.length).toFixed(6)); console.log((arr.filter(el => el === 0).length/arr.length).toFixed(6));