Array.prototype.min >= 0.4.1

Purpose

Get the lowest value inside the array

Syntax

Array#min ( Stringpath );

Parameters

path

Return values

Examples

Return the lowest value in the array

var arr = [0, 1, 2, 3, -1, 60, 20];

arr.min();
>>> -1

Return the lowest value in the array, look by path

var arr = [
	{a:  1},
	{a: 50},
	{a:  3},
	{a: 99},
	{a: 51}
];

arr.min('a');
>>> {a: 1}

Comments