const array = [ 'one', 'two', 'three' ] var res={} array.forEach(function(a){ res[a]=a }) console.log(res)