ufind if string in array is unique js code example
Example: javascript check if array has duplicates
function hasDuplicates(array) {
return (new Set(array)).size !== array.length;
}
function hasDuplicates(array) {
return (new Set(array)).size !== array.length;
}