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)
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 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,
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
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