Skip to content

Instantly share code, notes, and snippets.

@conanak99
Created March 9, 2016 00:42
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 conanak99/1bf72bb5eeaeed429fcb to your computer and use it in GitHub Desktop.
Save conanak99/1bf72bb5eeaeed429fcb to your computer and use it in GitHub Desktop.
// Sets
var s = new Set();
s.add("hello").add("goodbye").add("hello");
s.size === 2;
s.has("hello") === true;
// Maps
var m = new Map();
m.set("hello", 42);
m.set(s, 34);
m.get(s) == 34;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment