Skip to content

Instantly share code, notes, and snippets.

@markbrown4
Last active May 17, 2016 01:50
Show Gist options
  • Select an option

  • Save markbrown4/923565d12e7470639ea3d9ec1839d3a5 to your computer and use it in GitHub Desktop.

Select an option

Save markbrown4/923565d12e7470639ea3d9ec1839d3a5 to your computer and use it in GitHub Desktop.
var things = [{
name: 'Nope'
}, {
name: 'Nope'
}];
var selectedThings = new Set();
function select(thing) {
selectedThings.add(thing);
}
select(things[0])
select(things[1])
select(things[1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment