clamp.mjs 162 B

1234
  1. // Intentionally incorrect: use this small fixture to try a coding task.
  2. export function clamp(value, min, max) {
  3. return Math.min(min, Math.max(max, value));
  4. }