JS Built-ins
← Math161 / 215
Mathminbeginner

Math.min() β€” Basic Minimum

πŸ“– Usage Example
// Smallest of the given numbers
Math.min(1, 5, 3)   // β†’ 1
Math.min(-1, -5)    // β†’ -5

Use Math.min() to find the smallest value among a set of numbers, or to clamp a maximum bound.

Math.min()

Returns the smallest of the given numbers.

Challenge: Use Math.min(1, 2, 3) to find the smallest value.

πŸ’‘ Hints (1)
  • β€’ Math.min returns the smallest of all provided arguments