meta_pixel
Tapesearch Logo
Log in
Syntax - Tasty Web Development Treats

JS One Liners

Syntax - Tasty Web Development Treats

Wes Bos

Tech News, Technology, News

4.9 • 1.2K Ratings

🗓️ 3 January 2022

⏱️ 23 minutes

🧾️ Download transcript

Summary

In this Hasty Treat, Scott and Wes talk about some Javascript one liners that speed up your coding experience in one line. Sponsor - Linode Whether you’re working on a personal project or managing enterprise infrastructure, you deserve simple, affordable, and accessible cloud computing solutions that allow you to take your project to the next level. Simplify your cloud infrastructure with Linode’s Linux virtual machines and develop, deploy, and scale your modern applications faster and easier. Get started on Linode today with a $100 in free credit for listeners of Syntax. You can find all the details at linode.com/syntax. Linode has 11 global data centers and provides 24/7/365 human support with no tiers or hand-offs regardless of your plan size. In addition to shared and dedicated compute instances, you can use your $100 in credit on S3-compatible object storage, Managed Kubernetes, and more. Visit linode.com/syntax and click on the “Create Free Account” button to get started. Sponsor - Sentry If you want to know what’s happening with your code, track errors and monitor performance with Sentry. Sentry’s Application Monitoring platform helps developers see performance issues, fix errors faster, and optimize their code health. Cut your time on error resolution from hours to minutes. It works with any language and integrates with dozens of other services. Syntax listeners new to Sentry can get two months for free by visiting Sentry.io and using the coupon code TASTYTREAT during sign up. Show Notes 00:24:12 Welcome 01:24:11 Sponsor: Linode 02:11:02 Sponsor: Sentry 03:54:18 Twitter ask for One Liners 04:24:05 Math random const getPsuedoID =() => Math.floor(Math.random() * 1e15); 05:43:09 Random color Paul Irish random color '#'+Math.floor(Math.random()*16777215).toString(16); 06:41:06 Console.log as an object. console.log({ dog, person }); VS Marketplace Link 08:29:17 Edit anything document.designMode = "on" 10:15:15 Temporal date export const today = Temporal.Now.plainDateISO(); 11:44:05 Console(log) const myFunc = (age) ⇒ console.log(age) || updateAge() 13:26:13 Remove a prop const { propToRemove, ...rest } = obj; 15:29:01 PHP style debugging preElement.innerText ={JSON.stringify(val, '', ' ')}` 16:31:00 First and Last Destructure var {0: first, length, [length - 1]: last} = [1,2,3]; 17:34:17 Speed up audio video document.querySelector('audio, video’).playbackRate = 2 Overcast 19:44:15 Sleep function let sleep = (time = 0) => new Promise(r => setTimeout(r, time)) 20:26:00 If statements on one line If (!thing) return 'something' Tweet us your tasty treats Scott's Instagram LevelUpTutorials Instagram Wes' Instagram Wes' Twitter Wes' Facebook Scott's Twitter Make sure to include @SyntaxFM in your tweets

Transcript

Click on a timestamp to play from that location

0:00.0

Monday. Monday. Monday. Open wide dev fans. Get ready to stuff your face with

0:07.0

JavaScript CSS. Node module. Barbecue tips. Get workflow. Break dancing. Soft skills.

0:12.0

Web development. The hastiest. The craziest. The tastiest. Web development

0:17.0

treats. Coming in hot. Here is Wes Barakuda. Boss and Scott El Torro Lugo.

0:24.0

Tolinsky. Welcome to syntax in this.

0:29.0

JavaScript one liners episode of syntax. We're going to be talking about JavaScript

0:33.0

one liners little snippets and little quick little snippet, you know, you know, those

0:39.0

things. The JavaScript one liners, the little bit of code that you can write to do a whole

0:43.0

lot of stuff, sometimes a little bit of stuff, but sometimes they're just handy.

0:46.0

So we're going to be talking about some of these, some of our favorite ones,

0:49.0

someone's from Twitter and some little things here and there. My name is Scott

0:53.0

Tolinsky. I'm a developer from Defer Colorado. And with me, as always, is Wes

0:56.0

Boss. Yeah. We got some good one liners. This is funny stories. Actually, how I met

1:01.0

my wife with these JavaScript one liners. So if you are a

1:06.0

don't prowl for a partner, yeah.

1:09.0

Other ones that are going to make it work. Yeah. I'm not I'm if they were that good.

1:13.0

I don't I don't know how that happens.

1:16.0

We are sponsored by

1:21.0

LaNode in century. I'll talk to you about LaNode real quick. And Scott can

1:25.0

tell you about century, but you can use with LaNode. It's been our sponsors

1:29.0

that you can use together. It's like a happy little happy little family.

1:33.0

LaNode is cloud computing that developers trust. They offer linux servers

...

Please login to see the full transcript.

Disclaimer: The podcast and artwork embedded on this page are from Wes Bos, and are the property of its owner and not affiliated with or endorsed by Tapesearch.

Generated transcripts are the property of Wes Bos and are distributed freely under the Fair Use doctrine. Transcripts generated by Tapesearch are not guaranteed to be accurate.

Copyright © Tapesearch 2026.