ECMAScript 2019

Array.flat will flatten a multidemsional array. It will flatten 1 level by default. You can specify how many levels to flatten. flatMap flattens the result of a map. trimStart removes whitespace from the start of a string. And trimEnd removes it from the end. Create an object from an array of properties. Complements Object.entries. Convert a function to a string. Catch doesn't need an Error object anymore.