const addPropToObj = ((obj = {}) => (key, value) => { obj[key] = value; return obj })(/*{x : 55}*/) console.log(addPropToObj('name', 'John')); console.log(addPropToObj('age', 35));