coderbyte temukan solusi persimpangan
function FindIntersection(strArr) {
const data = strArr.join('.').split('.')
const firstArr = data[0].split(',')
const lastArr = data[1].split(',')
const srings = []
firstArr.forEach((val) => {
let data = lastArr.indexOf(val)
if(data !== -1) {
srings.push(val.trim())
}
})
return srings.join(',')
}
Restu Wahyu Saputra