Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

duplicate characters in a string javascript

const text = 'abcda'.split('')
text.some( (v, i, a) => {
  return a.lastIndexOf(v) !== i
}) // true
 
PREVIOUS NEXT
Tagged: #duplicate #characters #string #javascript
ADD COMMENT
Topic
Name
8+3 =