Skip to content

Instantly share code, notes, and snippets.

@tofusoup429
Created March 19, 2021 04:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tofusoup429/6a3564ef86ffe333bc24afedda45f455 to your computer and use it in GitHub Desktop.
Save tofusoup429/6a3564ef86ffe333bc24afedda45f455 to your computer and use it in GitHub Desktop.
"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