Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
orisa2
· 7y ago · 0 comments
From the post, I wasn't sure if you knew, but JS also has regular default parameters if that's all you want.
Comments
[–]
capableweb
7y 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)