Skip to content

Instantly share code, notes, and snippets.

@cesarkohl
Created January 13, 2020 14:44
Show Gist options
  • Select an option

  • Save cesarkohl/3e7ccae609e53bbe4059560eb6da2897 to your computer and use it in GitHub Desktop.

Select an option

Save cesarkohl/3e7ccae609e53bbe4059560eb6da2897 to your computer and use it in GitHub Desktop.
function Set () {
 var array = [];
 this.add = function (value) {
 if (array.indexOf (value) === -1) {
 array.push (value);
 }
 }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment