Max value in array

    0

    0

    Giovanny Gongora

    Codiga's TypeScript Recipes

    Return max value in array

    const nums: number[] = [2, 4, 6, 8, 1, 3, 5, 7];
    Math.max(...nums);
    
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    Legal
    • Security
    • Privacy Policy
    • Code Privacy
    • Terms of Service
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.