4 ms·
From the post, I wasn't sure if you knew, but JS also has regular default parameters if that's all you want.
by orisa2 7y ago
From the post, I wasn't sure if you knew, but JS also has regular default parameters if that's all you want.
- capableweb 7y agoNot 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)