Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

calculateArrayMinValue

  • calculateArrayMinValue(arr: Array<any>): number
  • calculate array element min value element;

    remark

    use JavaScript's Math.min method; it's like method calculateArrayMaxValue @{link};

    // eg. 1
    let minValue = calculateArrayMinValue([]);
    // now minValue is `0`;
    
    // eg. 2
    let minValue = calculateArrayMinValue([1, 2, 3, 4, 5]);
    // now minValue is `1`;
    
    // eg. 3
    let minValue = calculateArrayMinValue([1, 2, 3, 4, 5, '8', 10]);
    // now minValue is `1`;
    
    // eg. 4
    let minValue = calculateArrayMinValue([1, 2, 3, 4, 5, 'a', 10]);
    // now minValue is `NaN`;

    Parameters

    • arr: Array<any>

    Returns number

Legend

  • Variable
  • Function
  • Function with type parameter
  • Type alias
  • Interface
  • Interface with type parameter
  • Class
  • Class with type parameter
  • Enumeration

Generated using TypeDoc