Y
Hacker News
new
|
ask
|
show
|
jobs
by
orisa2
2398 days ago
From the post, I wasn't sure if you knew, but JS also has regular default parameters if that's all you want.
1 comments
capableweb
2398 days ago
Not as nice though, as the arguments still depend on the order. Passing a object gives the benefit of named arguments AND position of the arguments no longer matter (as object keys don't have order and also, it's a object with key/values)
link