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]))
Also in JavaScript:
- discord.js find role by name
- js know size of screen
- setting up a sprite sheet in js
- javascript read json file
- angular mouseenter
- js generate random list of names with for loop
- nodejs express routing
- create dynamic fields in react
- jquery remove class
- mongodb distancefield to kms
- vuejs cdn
- angular model output only
- backgroundImage react
- javascript run function once
- searchbox in api news in angular
- js change contenteditable value
- javascript append list
- js check if div have another div
- javascript time execution
- javascript array find highest value of array of objects by key
- react generate component command
- google script get sheet size
- nodejs read file to array
- javascript for loop starting from end