Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

Save cesarkohl/a8f61d3cb53c05340b5ca57b17698167 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);
 }
 },
this.showValues ​​= function () {
 console.log (array);
 }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment