const createObj = (...props) => Object.fromEntries(new Map(props.map(a => [a,a]))); console.log(createObj('a', 'b', 'c'))