This is just my personal opinion, but about the tip #2 I think that using the ES6 method could be…
Fran Verona
1

If you don’t want to have two commas separated merely by a space, then I would definitely leave a comment about the value omitted.

method(...['parameter1', /* parameter2 */, 'parameter3']);

If spread operators are of no interest to you, then sticking with undefined instead of null is the way to go since this simulates the default value for optional parameters in JavaScript.

function myFunc(a, b, c) {
console.log(`a: ${a}, b: ${b}, c: ${c}`);
}
myFunc('parameter1');
// a: parameter1, b: undefined, c: undefined

Thank you for sharing your thoughts! I’ll update the post to include the comment/* parameter2 */.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.