Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

coderbyte find intersection solutions

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(',')
}
 
PREVIOUS NEXT
Tagged: #coderbyte #find #intersection #solutions
ADD COMMENT
Topic
Name
4+3 =