const arr = [ { name:'tom', age:15 }, { name:'rose', age:17 }, { name:'tom', age:11 }, { name:'rose', age:15 }, { name:'jack', age:18 }, { name:'tom', age:10 }] var hash = {}; var abc=arr.reduce(function(item, next) { hash[next.name] ? '' : hash[next…