Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

duplicate characters in a string javascript

const text = 'abcda'.split('')
text.some( (v, i, a) => {
  return a.lastIndexOf(v) !== i
}) // true
Comment

PREVIOUS NEXT
Code Example
Javascript :: reverse array in javascript 
Javascript :: if in javascript 
Javascript :: repeat call n times in js 
Javascript :: normal function vs arrow function in javascript 
Javascript :: input in html table 
Javascript :: javascript display, show properties of object 
Javascript :: node js mysql variables 
Javascript :: canvas draw rect dashed 
Javascript :: js set value in object only if defined 
Javascript :: nunjucks check if in array 
Javascript :: leaflet core 
Javascript :: javascript div hover alert 
Javascript :: chart js react 
Javascript :: how to hide a screen from drawer in react navigation 5 
Javascript :: hardhat async test 
Javascript :: × Error: Invariant failed: You should not use <Switch outside a <Router 
Javascript :: js display 
Javascript :: javascript download file 
Javascript :: clean my react app 
Javascript :: separador de miles javascript 
Javascript :: reactnaviataion change title 
Javascript :: Get async: false 
Javascript :: check if alpine js is loaded 
Javascript :: Substring in Javascript using slice 
Javascript :: react native updating options with setoptions 
Javascript :: react linking to documents 
Javascript :: select class with data attribute jquery 
Javascript :: get buildspec.yml file for react app 
Javascript :: generator function 
Javascript :: phaser3 align text center 
ADD CONTENT
Topic
Content
Source link
Name
3+8 =