Updated: Jan 17
We don't need to specify the exception variable in the catch clause when we are using the try-catch statement.
trimStart and trimEnd
The String.prototype.trim() will remove the unwanted space on a string at start and end. But the String.prototype.trimStart() will remove just the unwanted space at the start of the string. The same case to the String.prototype.trimEnd.
The Object.fromEntries(iterable) helps to build the object from key-value pairs. The input of this method must be iterable.
The Array.prototype.flat() helps to flatten the multi-dimensional array. It takes the level of the dimensions as an optional argument. You can send 1, 2 or maybe Infinity as an argument.
The Array.prototype.flatMap() first map the array elements then flatten the array.
The Symbol is a primitive data type(symbol type). It is a static read-only value.
I hope this post is useful. Please check out another blog posts from this series.