Ad
Fundamentals
Arrays
Code
Diff
  • function Sum-OfPositive($NumberArray)
    {
      ($NumberArray | ?{$_ -gt 0} | Measure -sum).Sum
    }
    
    • function Sum-OfPositive($NumberArray)
    • {
    • ( $NumberArray | where{$_ -gt 0} | Measure-Object -sum).Sum
    • ($NumberArray | ?{$_ -gt 0} | Measure -sum).Sum
    • }