Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript string unique characters

const unique = (str) => {
	const cleanStr = str.replace(/ /gi, '');
    const set = [...new Set(cleanStr)];

    return set;
}

console.log(unique('asdqwe asdqwet dfadqwre  '));
 
PREVIOUS NEXT
Tagged: #javascript #string #unique #characters
ADD COMMENT
Topic
Name
7+7 =