dreamcode
Back to peaks
Problem Peaks · Cloud Hopper
BeginnerJavaScript
Reward: badge + 40 XP

Cloud Hopper

You're hopping across the sky, but you can only land on clouds that rise above height k. Given a list of cloud heights, return how many clouds you can land on.

EXAMPLES
countTallClouds([3,7,2,9], k=5)
2
countTallClouds([], k=4)
0
solution.js
JAVASCRIPT
Autosaved · just now
Tests · 0 of 3 passing
·[3,7,2,9], k=5 → run to check
·[], k=4 → run to check
·[5,5,5], k=5 → run to check
ON THE LINE
Cloud Hopper badge
Pass all 3 tests to claim it
+40 XP