Skip to content

Instantly share code, notes, and snippets.

@gulshanzealous
Created October 10, 2017 09:11
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 gulshanzealous/d3cfc339f3e6ed7f9635175ecea77aa0 to your computer and use it in GitHub Desktop.
Save gulshanzealous/d3cfc339f3e6ed7f9635175ecea77aa0 to your computer and use it in GitHub Desktop.
const x = new Set()
let p = x.add(4) // x equals Set{ 4 }
p = x.add('nine') // x equals { 4, 'nine' }
p = x.delete(4) // p equals true ---- WTF -----
x.delete(4)
p = x // p equals Set{ 'nine' } --- this is desired ---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment