JMAC Docs

JMAC / docs / Smallest

Smallest()Method : JMath

Finds the smallest number in an array


Values

function Smallest(...values: Number): Number

Parameters

values
A variable length rest parameter which can be passed any amount of numbers.

Returns

Number
The smallest of all passed .

Common Errors

SyntaxError: values must be of type Array, x given
Often occurs when values is accidentaly passed a straight Number.

Example


const average = JMath.Smallest([3, 8, 14, 9, 3, 8, 25]);

// Should return:

3


Log

JMAC 1b | 02-09-25

Method introduced.