Skip to content
This repository was archived by the owner on Feb 20, 2019. It is now read-only.
This repository was archived by the owner on Feb 20, 2019. It is now read-only.

Add a max function #114

@mis101bird

Description

@mis101bird

Hi,
Thanks for the awesome open source contribution tutorial. This is my first time to contribute the code.
I would like to add max function to get the maximum value of an array, and the implementation is showed below.

function __getMax(max, value) {
    if(value > max){
    	max=num;
    }
    return max;
}

function max(array){
    array.reduce(__getMax);
}

I hope I could contribute this issue :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions