Tommylogik retweeted
Tip: You can name capture groups for Regular Expressions in JavaScript. Define a named capture in angle brackets <> and they get returned under .groups.
![This feature is about identifying capture groups via names. // Without named capture groups const re = /(\d{4})-(\d{2})-(\d{2})/; const match = re.exec('2021-03-04'); console.log(match[1]); // → 2021 (year) console.log(match[2]); // → 03 (month) console.log(match[3]); // → 04 (day) // With named capture groups 🔥 const re = /(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})/; const match = re.exec('2021-03-04'); console.log(match.groups.year); // → 2021 console.log(match.groups.month); // → 03 console.log(match.groups.day); // → 04 // ... and with destructuring assignment 🔥🔥🔥 const [match, year, month, day] = re.exec('2021-03-04');](https://pbs.twimg.com/media/EzwqDp7VgAAQQnZ.jpg?name=small&format=webp)
ALT This feature is about identifying capture groups via names. // Without named capture groups const re = /(\d{4})-(\d{2})-(\d{2})/; const match = re.exec('2021-03-04'); console.log(match[1]); // → 2021 (year) console.log(match[2]); // → 03 (month) console.log(match[3]); // → 04 (day) // With named capture groups 🔥 const re = /(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})/; const match = re.exec('2021-03-04'); console.log(match.groups.year); // → 2021 console.log(match.groups.month); // → 03 console.log(match.groups.day); // → 04 // ... and with destructuring assignment 🔥🔥🔥 const [match, year, month, day] = re.exec('2021-03-04');
Tommylogik retweeted
You can either pay with money or with privacy.
This Post is from an account that no longer exists. Learn more
There must be something in the air this month. @Docker Why are you canceling legacy subscriptions for people to whom you have given a lifetime free tier? #Support #Docker #BetaTester #lifetime #technology #DevOps
Tommylogik retweeted
Thirteen JavaScript one-liners: medium.com/dailyjs/13-javasc…
Tommylogik retweeted
Everything you need to know about modern gaming via Tetris for iPhone.
A perfect game that fit on a 32kb Game Boy ROM is now a 431mb casino.
I had epiphany today.
It’s So weird.... I know right.
I haven’t had to think about getting a computer virus in such a long time.
Have you?
P.S. - I’m not a windows user anymore. Haven’t Trieste been for a long time.
#linux and @Apple.
#ThoughtsAt4am
Would love to help out @GovMurphy. Let’s see how this goes. Shouldnt be hard to #learncobol #COBOL #samsteachyourself #24hourcoding on @OReillyMedia
Tommylogik retweeted
We have extra FDA-approved ventilators. Will ship to hospitals worldwide within Tesla delivery regions. Device & shipping cost are free. Only requirement is that the vents are needed immediately for patients, not stored in a warehouse. Please me or @Tesla know.
Awe... I would be just as mad as the 5 year old but can super relate to the dad...
Be well. Be safe
This Post is from an account that no longer exists. Learn more
Tommylogik retweeted
When I was 24 and working at Apple I found myself in a heated debate with an engineer that I'd not met before.
Since I was young and knew everything, I was lecturing this man on some nuances of how drag and drop should behave when activated on a text selection.
🙄
You’re unable to view this Post because this account owner limits who can view their Posts. Learn more
Tommylogik retweeted
Walking into a javascript interview but the water bottle is a healthy knowledge of .reduce()
This is so weirdly Accurate. I have to let it sink in
Tommylogik retweeted
Needed this today.
A man was sitting alone, on a bench in a park, singing Bon Jovi's Living on a Prayer by himself.
By the end, the entire park joined along to sing with him.
(🎥@Goodable)



















