Hacker News new | past | comments | ask | show | jobs | submit login

Roughly:

    let max = list[0];
    for (let i = 0; i < list.length; i++) {
        max = Math.max(list[i], max);
    }
With a|b, you get the maximum between a and b. / is reduction. So, |/list, will be equivalent to list[0]|list[1]|list[2]|...|list[n], i.e. the maximum value in the list.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: