in javascript, the method to remove an item from...
an array: splice
a class list: remove
a map or set: delete (which is a keyword)
an object: delete (the keyword this time)
to add an element to an ordered list of elements, use .push()

to add an Element to an ordered list of Elements, use .append()
to check if a set contains an item, use .has()
to check if a class list contains an item, use .contains()
to check if a node has a /descendant/, use .contains()
to check if an array contains an item, use .indexOf() !== -1
to check if an object contains an item, well,
number of elements in an array or class list: x.length
number of elements in an object: Object.keys(x).length
number of elements in a node: x.childElementCount
number of elements in a map or set: x.size
python has del, in, len(). just saying
actually i never again want to hear about how it's weird that python has len() as a function instead of a method or property. the massive advantage is that you always know what it's fucking called
You can follow @eevee.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: