← #21 Swap two variables
#22

Use an underscore to name unused argument

Topics: JavaScript

You can use an underscore to name the argument which is not used in an arrow function. It makes the code more readable.

// No arguments
const noop = _ => {};

const range = (min, max) => (
Array(max - min + 1).fill(0).map((_, i) => min + i);
);

More

Fix a typo or suggest an improvement
#23 Style broken images