Get the number of index greater than value x

How to get the count of index which are greater then value x in an array

Eg: I have array

15, 46, 78, 98,36, 65,35,12,38

I need to get the count of number of index greater than 50

I will get output as 3

Hey @Sweety_Girl,

You can try to loop through the array and check each value. If the value is greater than 50, you will increment a counter. When you are done with the loop you can output the counter.

Zev

1 Like

Can we get that which out looping?

like oneline syntax