57
function distinct(a, b) { return Array.from(new Set([...a, ...b])) }
16
function distinct(a, b) { let arr = a.concat(b) let result = [] let obj = {} for (let i of arr) { if (!obj[i]) { result.push(i) obj[i] = 1 } } return result }
57
function distinct(a, b) { return Array.from(new Set([...a, ...b])) }
16
function distinct(a, b) { let arr = a.concat(b) let result = [] let obj = {} for (let i of arr) { if (!obj[i]) { result.push(i) obj[i] = 1 } } return result }