New to JavaScript — ES2022

New to JavaScript — ES2022

In this episode of Syntax, Scott and Wes talk about all the new stuff in ES2022 — what it is, why you might need it, and how to use it. Sanity - Sponsor Sanity.io is a real-time headless CMS with a fully customizable Content Studio built in React. Get a Sanity powered site up and running in minutes at sanity.io/create. Get an awesome supercharged free developer plan on sanity.io/syntax. LogRocket - Sponsor LogRocket lets you replay what users do on your site, helping you reproduce bugs and fix issues faster. It’s an exception tracker, a session re-player and a performance monitor. Get 14 days free at logrocket.com/syntax. Auth0 - Sponsor Auth0 is the easiest way for developers to add authentication and secure their applications. They provides features like user management, multi-factor authentication, and you can even enable users to login with device biometrics with something like their fingerprint. Not to mention, Auth0 has SDKs for your favorite frameworks like React, Next.js, and Node/Express. Make sure to sign up for a free account and give Auth0 a try with the link below: https://a0.to/syntax. Show Notes 04:50 - Regex indicies New d flag in a regex https://regex101.com/ This will tell you the indexes (indicies) of the regex matches Handy if you need to highlight or replaces matches in a string We can ask for the start and end positions of each matched capture group 07:16 - Class updates Private fields Properties and Methods to be kept private Prefix them with a # =Helpful for internal state and methods which should not be accessed directly or at all by external In React how we have __INTERNTAL_NEVER USE THIS class ColorButton extends HTMLElement { // All fields are public by default color = "red" // Private fields start with a #, can only be changed from inside the class #clicked = false } const button = new ColorButton() // Public fields can be accessed and changed by anyone button.color = "blue" // SyntaxError here console.log(button.#clicked) // Cannot be read from outside button.#clicked = true // Cannot be assigned a value from outside Getters and setters introduced in es5 https://www.w3schools.com/js/js_object_accessors.asp class Person { #hobbies = ['computers'] get #hobbiesGetter() { return this.#hobbies } #getHobbies() { return this.#hobbies } getHobbiesPublic() { return this.#hobbies } } const scott = new Person(); scott.#getHobbies(); // doesn't work scott.getHobbiesPublic(); // works 09:07 - Class fields This may seem super old because we have been polyfilling it forever Right now if you want an instance field on a class, you need to declare it in the constructor Now we can just declare them inside the class 10:36 - Static fields and methods As above can also be static with the static keyboard Works for methods too Explain what a static method is 13:17 - Top level await So handy in modules. Need to pull in some data? Simple. 15:19 - Ergonomic brand checks for private fields Used for checking if a private field on a class exists using the in keyword 16:00 - .at() method Strings and arrays - we can use square brackets to reference items of the array Super handy for grabbing the last item of an array // 🔥 New .at() method on arrays and strings const toppings = ['pepperoni', 'cheese', 'mushrooms']; // The old way to grab the last item toppings[toppings.length - 1]; // mushrooms // using .at() method with a negative index toppings.at(-1); // mushrooms // works with any index toppings.at(0); // pepperoni toppings.at(-2); // cheese // and with strings! 'Meeting Room: B'.at(-1) // B Why not use array[-1]? We used to use slice(-1) What about indexOf? 21:34 - Handy hasOwn method https://github.com/tc39/proposal-accessible-object-hasownproperty 24:51 - Class static block A static block allows you to run code before creating an optional static property during initialization https://github.com/tc39/proposal-class-static-block Links https://github.com/tc39/proposals/blob/master/finished-proposals.md ××× SIIIIICK ××× PIIIICKS ××× Scott: Ultraloq Smart Lock Wes: Magnatiles Shameless Plugs Scott: Web Components Course - Sign up for the year and save 25%! Wes: All Courses - Use the coupon code ‘Syntax’ for $10 off! 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

Episoder(968)

848: Web Components Can’t Save Us with Scott Jehl

848: Web Components Can’t Save Us with Scott Jehl

Scott and Wes talk with Scott Jehl about the benefits, challenges, and use cases of web components, particularly in design systems and performance. Show Notes 00:00 Welcome to Syntax! 00:55 Scott’s background and career Responsible Responsive Design Webpagetest.org 06:46 An overview of web components 09:06 Why should people care about web components? 13:16 Should you write your own web components? 14:39 Reactivity in web components 15:56 DOM parts 18:23 Styling web components 22:08 Brought to you by Sentry.io 22:33 CSS custom properties Mux Player Customizer 24:28 Responsive video 28:27 The polyfill use case 30:55 Shadow DOM challenges 36:04 Web components in design systems 41:58 How are people using web components? 43:25 Web components and server-side rendering 45:00 Scott’s thoughts on build tools 47:33 Sick Picks & Shameless Plugs Sick Picks Scott: Enhance Shameless Plugs Scott: Squarespace is hiring Web Components Demystified - Get 30% off with coupon code “syntax” Web Components Community Group Hit us up on Socials! Syntax: X Instagram Tiktok LinkedIn Threads Wes: X Instagram Tiktok LinkedIn Threads Scott: X Instagram Tiktok LinkedIn Threads Randy: X Instagram YouTube Threads

15 Nov 202451min

847: Syntax Holiday Gift Guide

847: Syntax Holiday Gift Guide

Scott and Wes are back with their annual Syntax Holiday Gift Guide! They’ve curated the best gadgets, tools, games, and even kitchen essentials for the dev in your life — plus a few treats anyone would love to unwrap. Show Notes 00:00 Welcome to Syntax! 00:46 Brought to you by Sentry.io. Open Source Pledge Members. 01:59 Syntax holiday gift guide. 02:25 Our absolute favorites. Leatherman Arc. Peak Design Everyday. 1.5 KG of Maldon, Salt Cellars. Anker Cube. Anker MagGo. Theragun, Off-Brand Massage Gun. Subscription to Cursor, Claude, ChatGPT. Syntax Swag. 13:33 Our (Scott’s) top games. Factorio. Cascadia. Azul. SteamDeck. 19:01 Gifts under $30. Braided USB-C Cables Right Angle Thunderbolt. Battery Daddy. MagSafe Popsocket. Hempz Apple Cider + Nutmeg Hand Lotion. Mens Cremo Body Wash. 27:50 Clothing gifts. Uniqlo Stretch Selvedge Denim. Naked and Famous Selvedge Denim. Scott DU/ER Jeans. Wool Toque Anything from Huckberry. 35:02 Desk item gifts. MX3s Master Mouse Target Candles Candle Melter Wax. Laptop Stand Rain Design mStand. Any Foldable Amazon Stand Desk Treadmill. Insta360 Link 2. Small Rig Rotatable Collar Mount. Thermal Printer. Cable Management Straps + Clips Mini Tripod. Super Clamp. Fishskyn. 45:02 Kids gifts. Yoto Player. Toniebox. First Cat in Space. Bathbombs. Kahn Academy Kids App. Codespark. 51:11 Kitchen gifts. Carbon Steel Frying Pan. Viral Egg Cooker. Glass Straws. Danish Whisk. Oxo Salt + Pepper Grinders. Paper Wheels. Whetstone. WÜSTHOF Nakiri Knife. Carbon Knife Co. Can Tumbler Glasses. Squirrel Rice Paddle. OTOTO Splatypus Jar Spatula. 59:02 Eatables. Hot Sauce: Truff Hot Sauce. Secret Aardvark. Cholula Gift Pack. Laoganma Chili Crisp. Merfs. Bachan’s Japanese BBQ Sauce. 01:00:51 Smart home gifts. Smart Dimmers ESP32 + WS2815 LED Strips 01:03:06 Shameless Plugs. Shameless Plugs Scott: Syntax on YouTube Hit us up on Socials! Syntax: X Instagram Tiktok LinkedIn Threads Wes: X Instagram Tiktok LinkedIn Threads Scott: X Instagram Tiktok LinkedIn Threads Randy: X Instagram YouTube Threads

13 Nov 20241h 3min

846: Talking EVs: Range Anxiety, Charging, and Tech

846: Talking EVs: Range Anxiety, Charging, and Tech

Scott and Wes unpack their experiences as electric car owners, sharing the highs and lows of making the switch. From range anxiety to charging infrastructure and cost savings, they talk about everything from the tech perks to the unexpected challenges of driving electric. Show Notes 00:00 Welcome to Syntax! 02:11 Brought to you by Sentry.io. 03:14 What cars and how long have we had them. Hyundai IONIQ 5. Tesla Model Y Long Range. 10:41 Range and dealing with range anxiety. 11:45 The EPA specs. 12:24 Things that affect range. 14:46 Charging. 17:52 Charging levels. 17:56 Level 1 charging. 19:01 Level 2 charging. 19:39 Level 3 charging. 20:10 Charging standards. 21:51 Electric car pricing. 25:56 Regenerative braking. 27:27 General maintenance. 29:04 Pricing and expenses. 31:48 Machine Gun Kelly Effect. 36:46 Would you go completely electric? 38:46 Electric-only tech. 40:57 Buying a new EV. 42:21 Edison Motors website, TikTok. Hit us up on Socials! Syntax: X Instagram Tiktok LinkedIn Threads Wes: X Instagram Tiktok LinkedIn Threads Scott: X Instagram Tiktok LinkedIn Threads Randy: X Instagram YouTube Threads

11 Nov 202444min

845: Are companies hiring? State of the dev job market with Taylor Desseyn

845: Are companies hiring? State of the dev job market with Taylor Desseyn

Scott and Wes talk with Taylor Desseyn about the shifting developer job market. Taylor shares practical tips for standing out, building genuine connections, and finding opportunities in a competitive hiring landscape. Show Notes 00:00 Welcome to Syntax! 01:38 Meet Taylor Desseyn 03:51 Is the dev job market as bad as it seems? 06:47 How to stand out when applying for a dev job? 11:03 Who is getting hired? 14:16 What tech/languages are companies hiring for right now? 16:37 Is there less work? 20:10 The small things that get you hired 24:19 What to do when you get laid off 27:42 Brought to you by Sentry.io 28:07 How to make yourself more appealing to employers 32:39 Networking tips and tricks 39:01 Remote work and office return trends 40:58 Why you should negotiate carefully 43:38 What’s the most important thing right now for getting hired? 45:48 Should devs understand stakeholders and business goals? 46:42 Creating a good resume 52:00 Sick Picks & Shameless Plugs Sick Picks Taylor: heydey mic Randy Rektor’s YouTube Channel Shameless Plugs Taylor: Torc Guidance Counselor 2.0 Hit us up on Socials! Syntax: X Instagram Tiktok LinkedIn Threads Wes: X Instagram Tiktok LinkedIn Threads Scott: X Instagram Tiktok LinkedIn Threads Randy: X Instagram YouTube Threads

8 Nov 202457min

844: TypeScript, Branded Types, Streaming vs Polling + More

844: TypeScript, Branded Types, Streaming vs Polling + More

Scott and Wes serve up listener questions on everything from SvelteKit’s limits and the quirks of branded types in TypeScript to handling email queues and secure token storage in cookies. Plus, they get into app security, the evolution of checkout flows, and why QA teams can actually be game-changers for dev teams. Show Notes 00:00 Welcome to Syntax! 00:50 Catching up. 01:52 Brought to you by Sentry.io. 02:56 What are the limitations of SvelteKit? 06:41 Svelte 5 updates. 07:53 Branded types in TypeScript. EggHead.io Blog. 11:56 Queue applications and a ‘poor man’s queue’. 17:20 The real value of a functional QA team. 21:34 Invoker commands. Invokers Explained. Denver Script Talk. 26:29 Growing security and permissions concerns. Little Snitch. 33:03 Stripe vs PayPal in 2024. 38:24 Christmas gift guide. 38:39 Websockets vs streams vs polling. 41:04 Storing access and refresh tokens in a cookie. 45:41 Shipping with TypeScript errors. 49:34 Sick Picks + Shameless Plugs. Sick Picks Scott: The Black Stuff Deodorant. Wes: Apple Watch Charging Brick. Shameless Plugs Scott: Syntax on YouTube. Hit us up on Socials! Syntax: X Instagram Tiktok LinkedIn Threads Wes: X Instagram Tiktok LinkedIn Threads Scott: X Instagram Tiktok LinkedIn Threads Randy: X Instagram YouTube Threads

6 Nov 202456min

843: Copilot Kills Cursor? Reacting to Github Universe Keynote

843: Copilot Kills Cursor? Reacting to Github Universe Keynote

Scott and Wes react to the big GitHub Universe announcements, recorded live at GitHub Universe. They dive into Copilot’s new features, exploring how its advancements stack up against Cursor AI in the battle for the ultimate AI-driven developer tool. Show Notes 00:00 Welcome to Syntax! 01:12 Our Syntax Meetup. 02:54 AI is everywhere. 03:22 Sherlocking and jockeying for position. 04:49 GitHub Copilot introduces alternative LLMs. GitHub Copilot 06:31 New tools are build upon existing LLMs. 09:14 VSCode reclaiming ground from Cursor. Cursor 10:31 The new features. 10:34 Multi-file editing. 10:54 Use-cases for multi-file editing. 12:58 Multi-model selection. 13:05 Repo indexing. 13:50 Copilot instructions. 14:34 Examples of Cursor rules. 16:39 No mention of multiple-line suggestions. 18:02 Multi-file edit? 20:26 Code review. 22:36 GitHub Pull Requests plugin. 24:34 Investing in AI ‘big bets’. 26:29 Scott’s mysterious YouTube unreleased feature. 27:11 3-minute YouTube shorts. Wes’ TikTok. 28:29 GitHub Marketplace. 32:18 Copilot Workspace. 34:53 Copilot Workspace features yet to come. 36:25 GitHub Spark. Bolt.new. 42:44 Final thoughts on Copilot vs Cursor. 44:03 What products do you think are in trouble? 50:26 Sick Picks & Shameless Plugs. Sick Picks Scott: Waymo. Wes: Waymo. Hit us up on Socials! Syntax: X Instagram Tiktok LinkedIn Threads Wes: X Instagram Tiktok LinkedIn Threads Scott: X Instagram Tiktok LinkedIn Threads Randy: X Instagram YouTube Threads

4 Nov 202455min

842: There's Python in my JavaScript! with Andrea Giammarchi

842: There's Python in my JavaScript! with Andrea Giammarchi

Scott and Wes talk with Andrea Giammarchi (aka WebReflection) about his projects, including LinkDOM and PyScript, and the exciting future of running Python in the browser via WebAssembly. Show Notes 00:00 Welcome to Syntax! 01:04 Andrea’s background and early work LinkDOM 07:25 Brought to you by Sentry.io 09:56 Pyscript 14:31 Why run Python in the browser? 20:17 Using WebAssembly to run different languages in JS 23:33 The advantages of WebAssembly 25:55 What excites Andrea about WASM Proposal: ESX as core JS feature 31:10 What is WASI? 32:21 Andrea’s experience with IOT and microcontrollers 35:35 How can the JS ecosystem be improved? 38:07 Should we have reactivity in the browser? Signals 41:06 Andrea’s thoughts on server-side APIs 43:43 Andrea’s thoughts on TypeScript 49:13 Sick Picks & Shameless Plugs Sick Picks Andrea: ESP32 Shameless Plugs Andrea: Andrea’s X / Twitter Hit us up on Socials! Syntax: X Instagram Tiktok LinkedIn Threads Wes: X Instagram Tiktok LinkedIn Threads Scott: X Instagram Tiktok LinkedIn Threads Randy: X Instagram YouTube Threads

1 Nov 202453min

841: Spooky Web Dev Horror Stories - PART 2

841: Spooky Web Dev Horror Stories - PART 2

Scott and Wes continue to share hair-raising developer horror stories submitted by listeners. From accidentally severing access to crucial databases to a limitless coupon code that cost millions, these tales will have you on the edge of your seat. Tune in for more wild mishaps, close calls, and hard-learned lessons from the dark side of coding. You won’t want to miss this second round of spooky web dev stories! Show Notes 00:00 Welcome to Syntax! 00:49 Brought to you by Sentry.io. 01:32 ‘Monkey Business’ 03:21 ‘Spooky Integration Bug’ 06:25 ‘Worst Case Wake Up’ 08:57 ‘Severed Trunk and Missing Backups’ 11:21 ‘Brute Force Too Brutal’ 12:30 ‘A Dorm Room Bee Movie’ 15:46 ‘No Goats’ 16:45 ‘Pokémon Problems’ 18:08 ‘Late Night’ 22:21 ‘Bootcamp Bungle’ 26:19 ‘Film School F*** Up’ 30:26 ‘AWS Clusterf***’ 31:26 ‘Limitless Coupon Disaster’ Episode #451, Episode #609. 33:55 ‘Ruined Vacation’ 35:47 ‘Console.swear’ 37:28 ‘Another Coupon Disaster’ 40:46 ‘The Doctor’ Wes’ Burner List. 43:01 ‘Marketing Nightmare’ 45:10 What did we learn this year? 45:12 You need processes. 48:42 Ask for help. 49:44 Dry-run queries + soft delete. 51:14 Code reviews. Episode #830. 52:11 Version control. 53:58 Sick Picks + Shameless Plugs. Sick Picks Scott: Nobody Wants This. Wes: Truffle Hot Sauce. Shameless Plugs Scott: syntax.fm. Wes: syntax.fm/spooky. Hit us up on Socials! Syntax: X Instagram Tiktok LinkedIn Threads Wes: X Instagram Tiktok LinkedIn Threads Scott: X Instagram Tiktok LinkedIn Threads Randy: X Instagram YouTube Threads

30 Okt 202458min

Populært innen Politikk og nyheter

giver-og-gjengen-vg
aftenpodden-usa
forklart
popradet
aftenpodden
stopp-verden
det-store-bildet
fotballpodden-2
bt-dokumentar-2
nokon-ma-ga
rss-gukild-johaug
dine-penger-pengeradet
hanna-de-heldige
aftenbla-bla
rss-penger-polser-og-politikk
rss-ness
unitedno
frokostshowet-pa-p5
e24-podden
oppdatert