Created
March 19, 2021 04:10
-
-
Save tofusoup429/6a3564ef86ffe333bc24afedda45f455 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
Object.defineProperty(exports, "__esModule", { value: true }); | |
exports.checkIfNoSameElementExistInArray = void 0; | |
var checkIfNoSameElementExistInArray = function (_array) { | |
//return false if any overlapped value exist. | |
//return true if no same element exists. | |
var arrayLen = _array.length; | |
var set = new Set(_array); | |
var setLen = set.size; | |
return arrayLen === setLen; | |
}; | |
exports.checkIfNoSameElementExistInArray = checkIfNoSameElementExistInArray; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment