

is a getter for reading the description of a symbol. Optional catch binding: We can now omit the parameter of a catch clause if we don’t use it. trim() but remove whitespace only at the start or only at the end of a string. Each entry is a two-element Array with a property key and a property value. omEntries() creates an object from an iterable over entries. Optionally, we can tell it at which depth of nesting it should stop flattening. flat() converts nested Arrays into flat Arrays.

(): This method throws if flag /g isn’t set and returns an iterable with all match objects for a given string. It supports integer numbers that can be arbitrarily large (storage for them grows as necessary).

Previously the Logical Or operator ( ||) was used in this case but it has downsides here because it returns the default value whenever the left-hand side is falsy (which isn’t always correct).īigints – arbitrary-precision integers: Bigints are a new primitive type. This operator lets us use a default value whenever something is missing. This expression is defaultValue if value is either undefined or null and value otherwise. Private slot checks (“ergonomic brand checks for private fields”): The following expression checks if obj has a private slot #privateSlot:
