@XavierConleyAug 12.2022 — #If ES6 can be used: Because a Set's values have to be unique, you could put the array in a Set object and compare the size of the Set against the array's length: function checkIfDuplicateExists(arr) { return new Set(arr).size !== arr.length }
var example = ["a", "b", "b", "c"]; var example2 = ["a", "b", "c"];