Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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