const createObj = (...props) => props.reduce((a, b) => ({...a, [b] : b}), {}); console.log(createObj('a', 'b', 'c'))