void main() {
var numbers = [5, 10, -4, 27, -8, 6, -2];
var result = numbers.where((number) => number > 0).length;
print("count: ${result}");
}
Output
count: 4
void main() {
var numbers = [5, 10, -4, 27, -8, 6, -2];
var result = numbers.where((number) => number > 0).length;
print("count: ${result}");
}
count: 4