Skip to content

Instantly share code, notes, and snippets.

@kyh196201
Created September 10, 2024 01:52
Show Gist options
  • Save kyh196201/efc90b9cc08abba4dae223b849d6a17a to your computer and use it in GitHub Desktop.
Save kyh196201/efc90b9cc08abba4dae223b849d6a17a to your computer and use it in GitHub Desktop.
Apply min max javascript
function minMax(min, max, value) {
if (value < min) return min
if (value > max) return max
return value
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment