regex to find only words with duplicate chars javascript code example
Example: duplicate characters in a string javascript
const text = 'abcda'.split('')
text.some( (v, i, a) => {
return a.lastIndexOf(v) !== i
}) // true
const text = 'abcda'.split('')
text.some( (v, i, a) => {
return a.lastIndexOf(v) !== i
}) // true