Skip to content

intro-javascript/chapitre_5/js/minimum.js #9

@eliottealderson

Description

@eliottealderson

L'utilisation de Math.min() peut-elle être envisagée ?

function min(x, y){
    return Math.min(x, y);
}

console.log(min(4.5, 5)); // Doit afficher 4.5
console.log(min(19, 9)); // Doit afficher 9
console.log(min(1, 1)); // Doit afficher 1

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