OPTIONAL CATCH BINDING
Prior to ES2019, the structure of a try/catch block was fairly rigid. Even if you did not wish to use the error object caught, the parser still required you to assign the error object a variable name inside the catch
clause:
try {
throw 'foo';
} catch (e) {
// An error happened, but you don't care about the error object
}
In ES2019, you are now able to omit the error object assignment and simply ignore the error entirely:
try {
throw 'foo';
} catch {
// An error happened, but you don't care about the error object
}