Course · Section 2: JavaScript Fundamentals – Part 1 · Lecture 13: Basic Operators
Implement `clamp(n, lo, hi)` returning `n` limited to the range `[lo, hi]`.
+ 1 hidden test run on Submit.
Math.min(Math.max(n, lo), hi) first lifts n to at least lo, then caps it at hi.
Run your code to see results.