Practice ยท 1 of 1
Clamp
Implement clamp(value, low, high): value if in range, low if below, high if above. One return-statement version exists with the conditional operator โ find it if you like.
Difficulty: beginner
Press Submit to check your solution.
Back to lesson: Practice: Functions Practice: Contracts