5 XP challenge
Clamp a Setting
very easy
Build it yourself · 3 min
1 Learn2 Predict3 Solve
TaskYour mission
Return value clamped to the inclusive range low..high. Inputs are integers from -100 to 100 and low <= high.
Examples
| Input | Return |
|---|---|
value = 5, low = 1, high = 8 | 5 |
value = 0, low = 1, high = 8answer: 0 → 1. The result is 1. | 1 |
Your code
Write your answer inside Solution, then use return to send it back.
Ln 1, Col 1
JavaScript
Try examples runs the public examples. Check my code checks your full answer and saves your completion.