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

>

    function f(a, b, c, d)
        a = a or 1
        b = b or 2
        c = c or 3
        d = d or 4
    end
Compare with:

    f = (a=1, b=2, c=3, d=4) -> ...
Also note the latter is correct when you call it as f(false).



Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: