Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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
9+4 =