Skip to content

Instantly share code, notes, and snippets.

@amysimmons
Created July 17, 2018 20:28
// REGULAR ARRAY (can have duplicates)

x = []
x.push(1)
x.push(1)
x.length // 2

// SET (cannot have duplicates)

y = new Set()
y.add(1)
y.add(1)
y.size // 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment