Ad
Code
Diff
  • const getMin = (l) => l.sort((a, b) => a && b ? a - b : b)[0] || 0
    
    • const getMin = (l) => l.filter(i => i > 0).sort((a, b) => a - b)[0] || 0
    • const getMin = (l) => l.sort((a, b) => a && b ? a - b : b)[0] || 0