Optional named parameters

Hello @acagastya,

Personally, I think this is unnecessary as we could just pass an object as the argument.

Example with default properties...

function plot({ x = 0, y = 0 }) {
  return y - x;
}
plot({ x: 1, y: 1 });

For JSDocs...

/**
 * @param {{ x: number, y: number }} coordinates
 * @returns {number}
 */
1 Like