Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

remove duplicate value from string

// remove duplicate value from string
let str = "a b a";
let words = str.toLowerCase().split(" ");

const remDuplicate = words.filter((data,index,src)=>{
  return src.indexOf(data)===index
})

console.log("remDuplicate =>",remDuplicate)
 
PREVIOUS NEXT
Tagged: #remove #duplicate #string
ADD COMMENT
Topic
Name
3+1 =