Answers for "Find the stray number"

0

Find the stray number

const stray = numbers => {
  let number = 0
  
  numbers.forEach(x => numbers.indexOf(x) ? number = x : null)
  return number
}
console.log(stray([17, 17, 3, 17, 17, 17, 17]))
Posted by: Guest on June-18-2020

Code answers related to "Find the stray number"

Code answers related to "Javascript"

Browse Popular Code Answers by Language