Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There is optional args for JS.

And it's not hack since it's a partial form of pattern matching.

Although simple and consice is absolutely not JS is famous for, a lot of functional programming languages with consice design do the same thing.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: