Open 499190982 opened 2 years ago
` function merge(arr) { let obj = {}; arr.toString() .split(",") .forEach((num) => { if (obj[num]) { obj[num].push(num); } else { obj[num] = [num]; } }); return Object.values(obj).toString().split(","); }
`
` function merge(arr) { let obj = {}; arr.toString() .split(",") .forEach((num) => { if (obj[num]) { obj[num].push(num); } else { obj[num] = [num]; } }); return Object.values(obj).toString().split(","); }
`