News for hackers. Stuff that matters.
Re:What’s New in ES2019 by padolsey on Tuesday July 30, 2019 @08:37AM (#20564230)
Quite useful in situations such as:

> (str.match(regexWithGroup) || [, null])[1]

I.e. if the regex matches, then give me the first group (1st index) otherwise give me null.

There are no comments on this comment yet.