Hacker News new | ask | show | jobs
by moretti 3881 days ago
You still have to simulate named arguments with an object:

    const foo = ({ a = 2, b = 2, c = 3 } = {}) => a * b * c;
    const dict = {b: 4, c: 6};

    foo(); // 12
    foo(dict); // 48