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