1 2 3 4 5 6 7 8 9 10
function foo(x, y = x) { return y; } foo({ bar: 1 }).bar; // ^ defined: 5 foo({}, { bar: 2 }).bar; // ^ defined: 9