<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="preload" as="image" href="https://bytes.dev/images/bytes-banner-rounded.png">
<link rel="preload" as="image" href="https://bytes.dev/images/content/eyes.png">
<link rel="preload" as="image" href="https://bytes.dev/images/content/out-of-breath-jogger.jpg">
<link rel="preload" as="image" href="https://bytes.dev/images/fb-share-icon.png">
<link rel="preload" as="image" href="https://bytes.dev/images/li-share-icon.png">
<link rel="preload" as="image" href="https://bytes.dev/images/tw-share-icon.png">
<link rel="preload" as="image" href="https://bytes.dev/images/em-share-icon.png">
<link rel="preload" as="image" href="https://bytes.dev/images/content/sonar-logo.png">
<link rel="preload" as="image" href="https://bytes.dev/images/content/long-tie.jpg">
<link rel="preload" as="image" href="https://bytes.dev/images/content/spot-the-bug.png">
<link rel="preload" as="image" href="https://bytes.dev/images/content/cool-bits.png">
<link rel="preload" as="image" href="https://bytes.dev/images/bytes-icon.png">
<title>Bytes: React 19.3</title>
<meta name="color-scheme" content="light dark">
<meta name="supported-color-schemes" content="light dark">
<link href="https://fonts.googleapis.com/css2?family=Fira+Mono&family=Outfit:wght@400;500;700;900&family=Paytone+One" rel="stylesheet">
<style>@media (prefers-color-scheme: dark) {
.email-wrapper {
color: #F9F4DA !important;
background-color: #0F0D0E !important;
}
hr {
border-color: #262422 !important;
}
mark {
background-color: #231F20 !important;
color: #F9F4DA !important;
}
pre {
background-color: #231F20 !important;
border: 1px solid #231F20 !important;
color: #F9F4DA !important;
}
.bg-alt {
background-color: #231F20 !important;
}
.unsubscribe-link {
color: #504C48 !important;
}
.token.punctuation {
color: #f9f4da !important;
}
}
@media screen and (min-width: 600px) {
.mobile-break {
display: none;
}
}</style>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<table class="email-wrapper" border="0" cellspacing="0" width="100%" style="background-color: #FFF; border-collapse: collapse; color: #231F20; font-family: Outfit, sans-serif; font-size: 18px; width: 100%;"><tbody><tr>
<td style="border-collapse: collapse !important; word-break: normal;"></td>
<td width="600px" style="border-collapse: collapse !important; width: 600px; word-break: normal;"><div style="max-width:600px;padding-top:80px">
<div style="text-align:center"><img width="600" style="max-width: 100%; padding-bottom: 40px;" src="https://bytes.dev/images/bytes-banner-rounded.png" alt="Bytes"></div>
<p style="font-family: Outfit, sans-serif; font-size: 19px; line-height: 1.5; padding-left: 24px; padding-right: 24px;"><strong style="font-weight: 600;">Today’s issue:</strong> A cure for cache-poison, Meta’s cannabis-infused database proxy, and how a hint of Marxism could fix open source.</p>
<p style="font-family: Outfit, sans-serif; font-size: 19px; line-height: 1.5; padding-left: 24px; padding-right: 24px;">Welcome to <a href="https://c5e21242.click.convertkit-mail.com/r8u3l3erqqhoh3pqmrmf2hdx44d42h7h4n26/x0hph3ueqgd3z4h5hl/aHR0cHM6Ly9ieXRlcy5kZXYvYXJjaGl2ZXMvNTIx" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1886871837">#521</a>.</p>
<hr style="border: 0; border-bottom: 5px solid; border-color: #f5f5f5; margin-bottom: 100px; margin-top: 100px;">
<div style="text-align:center;margin-bottom:36px">
<img width="80" src="https://bytes.dev/images/content/eyes.png" alt="Eyeballs logo" style="max-width: 100%;"><h2 style="font-family: Paytone One, sans-serif; font-size: 28px; margin-top: 10px; text-transform: uppercase;">The Main Thing</h2>
</div>
<div class="bg-alt" style="background-color: #f5f5f5; border-radius: 16px; margin-bottom: 40px; max-width: 100%; padding: 24px; padding-bottom: 12px;">
<img src="https://bytes.dev/images/content/out-of-breath-jogger.jpg" alt="An exhausted jogger bent over with hands on knees catching their breath" width="600" style="border-radius: 5px; max-width: 100%;"><p style="font-family: Outfit, sans-serif; font-size: 17px; font-style: italic; line-height: 1; margin: 0; padding-bottom: 4px; padding-left: 24px; padding-right: 24px; padding-top: 10px; text-align: center;">React having its own millennial midlife crisis<!-- --> </p>
</div>
<h3 style="font-size: 24px; margin-bottom: 0; padding-left: 24px; padding-right: 24px;">React 19.3</h3>
<p style="font-family: Outfit, sans-serif; font-size: 19px; line-height: 1.5; padding-left: 24px; padding-right: 24px;">While most of the world was debating if AI is going to kill us all in the next 10 years, <a href="https://c5e21242.click.convertkit-mail.com/r8u3l3erqqhoh3pqmrmf2hdx44d42h7h4n26/6qhehoul9q6ow4aohk/aHR0cHM6Ly9yZWFjdC5kZXYvYmxvZy8yMDI2LzA5LzA5L3JlYWN0LTE5LTM=" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1886871838">the React team quietly shipped React 19.3</a>. So like the good ol’ days when all we had to worry about was a rogue <code style="font-size: 15px;">useEffect</code> taking down the internet, we’re back to writing about React.</p>
<p style="font-family: Outfit, sans-serif; font-size: 19px; line-height: 1.5; padding-left: 24px; padding-right: 24px;">My first observation, as someone who watched a little too much TMZ back in 2005, was that there appears to have been a bit of a shakeup to the team structure, and some clues on where the project might be going in the future.</p>
<p style="font-family: Outfit, sans-serif; font-size: 19px; line-height: 1.5; padding-left: 24px; padding-right: 24px;"><em>Project Updates:</em></p>
<p style="font-family: Outfit, sans-serif; font-size: 19px; line-height: 1.5; padding-left: 24px; padding-right: 24px;">In addition to some of the OGs (Sebastian Markbåge and Joe Savona) leaving the project, the project now seems to be organized around 4 pillars: Server, DOM, Fiber, and Compiler. While this could have been the case for a while and I’m just now noticing, it does signal that the project is stabilizing and it’s unlikely to see any wild paradigm-changing shifts - a la hooks and RSC (especially now that Seb is gone). I think that shows up in this release where features that have been in the works for over a year are finally being released.</p>
<p style="font-family: Outfit, sans-serif; font-size: 19px; line-height: 1.5; padding-left: 24px; padding-right: 24px;"><em>What landed in 19.3:</em></p>
<ul>
<li>
<p style="font-family: Outfit, sans-serif; font-size: 19px; line-height: 1.5;"><strong style="font-weight: 600;">ViewTransitions:</strong> This new component allows you to animate elements as they enter, exit, move or resize using built-in support for the browser’s View Transition API. Please be warned, you will still need to write CSS.</p>
</li>
<li>
<p style="font-family: Outfit, sans-serif; font-size: 19px; line-height: 1.5;"><strong style="font-weight: 600;">Fragment Refs:</strong> Fragment refs allow you to access the DOM of the Fragment’s children, allowing you to set up event listeners, manage focus, and observers without needing an extra DOM element.</p>
</li>
<li>
<p style="font-family: Outfit, sans-serif; font-size: 19px; line-height: 1.5;"><strong style="font-weight: 600;">Client / Server updates:</strong> Now you can use Context directly in server components and pass data to your context like this.</p>
</li>
</ul>
<pre class="language-js" style="-moz-hyphens: none; -moz-tab-size: 2; -ms-hyphens: none; -o-tab-size: 2; -webkit-hyphens: none; background-color: #f9f9f9; border: 1px solid #f9f9f9; border-radius: 8px; color: #c0c5ce; direction: ltr; font-family: 'Fira Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 15px; hyphens: none; line-height: 1.5; overflow: auto; padding: 24px; tab-size: 2; text-align: left; white-space: pre; word-break: normal; word-spacing: normal;"><code class="language-js" style="-moz-hyphens: none; -moz-tab-size: 2; -ms-hyphens: none; -o-tab-size: 2; -webkit-hyphens: none; color: #c0c5ce; direction: ltr; font-family: 'Fira Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 15px; hyphens: none; line-height: 1.5; tab-size: 2; text-align: left; white-space: pre; word-break: normal; word-spacing: normal;"><span class="token comment" style="color: rgb(167, 167, 167); font-size: 15px;">// server-component.js</span>
<span class="token keyword" style="color: #f38ba3; font-size: 15px;">import</span> <span class="token punctuation" style="color: #231F20; font-size: 15px;">{</span> UserContext <span class="token punctuation" style="color: #231F20; font-size: 15px;">}</span> <span class="token keyword" style="color: #f38ba3; font-size: 15px;">from</span> <span class="token string" style="color: #f99157; font-size: 15px;">'./user-context'</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">;</span>
<span class="token keyword" style="color: #f38ba3; font-size: 15px;">export</span> <span class="token keyword" style="color: #f38ba3; font-size: 15px;">async</span> <span class="token keyword" style="color: #f38ba3; font-size: 15px;">function</span> <span class="token function" style="color: #9d7dce; font-size: 15px;">Layout</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">(</span><span class="token parameter" style="color: #f38ba3; font-size: 15px;"><span class="token punctuation" style="color: #231F20; font-size: 15px;">{</span> children <span class="token punctuation" style="color: #231F20; font-size: 15px;">}</span></span><span class="token punctuation" style="color: #231F20; font-size: 15px;">)</span> <span class="token punctuation" style="color: #231F20; font-size: 15px;">{</span>
<span class="token keyword" style="color: #f38ba3; font-size: 15px;">const</span> currentUser <span class="token operator" style="color: #12b5e5; font-size: 15px;">=</span> <span class="token keyword" style="color: #f38ba3; font-size: 15px;">await</span> <span class="token function" style="color: #9d7dce; font-size: 15px;">getCurrentUser</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">(</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">)</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">;</span>
<span class="token keyword" style="color: #f38ba3; font-size: 15px;">return</span> <span class="token punctuation" style="color: #231F20; font-size: 15px;">(</span>
<span class="token operator" style="color: #12b5e5; font-size: 15px;"><</span>UserContext value<span class="token operator" style="color: #12b5e5; font-size: 15px;">=</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">{</span>currentUser<span class="token punctuation" style="color: #231F20; font-size: 15px;">}</span><span class="token operator" style="color: #12b5e5; font-size: 15px;">></span>
<span class="token punctuation" style="color: #231F20; font-size: 15px;">{</span>children<span class="token punctuation" style="color: #231F20; font-size: 15px;">}</span>
<span class="token operator" style="color: #12b5e5; font-size: 15px;"><</span><span class="token operator" style="color: #12b5e5; font-size: 15px;">/</span>UserContext<span class="token operator" style="color: #12b5e5; font-size: 15px;">></span>
<span class="token punctuation" style="color: #231F20; font-size: 15px;">)</span>
<span class="token punctuation" style="color: #231F20; font-size: 15px;">}</span>
</code></pre>
<p style="font-family: Outfit, sans-serif; font-size: 19px; line-height: 1.5; padding-left: 24px; padding-right: 24px;"><strong style="font-weight: 600;">Bottom line:</strong> React is starting to look like a middle-aged millennial that moved to the suburbs, but <a href="https://c5e21242.click.convertkit-mail.com/r8u3l3erqqhoh3pqmrmf2hdx44d42h7h4n26/kkhmh2unx72me7hlh7/aHR0cHM6Ly94LmNvbS9yYXVjaGcvc3RhdHVzLzgwMTAwNTk2MTMzNDk0Mzc0NA==" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1886871839">Guillermo is probably still pondering its implications</a> (at least for a few more months).</p>
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse: collapse; margin-top: 40px; text-align: center;"><tbody><tr><td style="border-collapse: collapse !important; padding-top: 12px; word-break: normal;">
<a href="https://c5e21242.click.convertkit-mail.com/r8u3l3erqqhoh3pqmrmf2hdx44d42h7h4n26/58hvh8ug6eo7ops6h4/aHR0cHM6Ly9mYWNlYm9vay5jb20vc2hhcmVyL3NoYXJlci5waHA_dT1odHRwcyUzQSUyRiUyRmJ5dGVzLmRldiUyRmFyY2hpdmVzJTJGNTIx" rel="noopener" style="color: #12b5e5; font-weight: 600; padding-left: 5px; text-decoration: none;" target="_blank" url-id="1886871840"><img alt="" style="display: inline-block; max-width: 100%; width: 32px;" width="25" src="https://bytes.dev/images/fb-share-icon.png"></a><a href="https://c5e21242.click.convertkit-mail.com/r8u3l3erqqhoh3pqmrmf2hdx44d42h7h4n26/25h2h9u3m50d0va3h4/aHR0cHM6Ly93d3cubGlua2VkaW4uY29tL3NoYXJpbmcvc2hhcmUtb2Zmc2l0ZS8_dXJsPWh0dHBzJTNBJTJGJTJGYnl0ZXMuZGV2JTJGYXJjaGl2ZXMlMkY1MjE=" rel="noopener" style="color: #12b5e5; font-weight: 600; padding-left: 5px; text-decoration: none;" target="_blank" url-id="1886871841"><img alt="" style="display: inline-block; max-width: 100%; width: 32px;" width="25" src="https://bytes.dev/images/li-share-icon.png"></a><a href="https://c5e21242.click.convertkit-mail.com/r8u3l3erqqhoh3pqmrmf2hdx44d42h7h4n26/qvh8h8udkx2n24ulhk/aHR0cHM6Ly90d2l0dGVyLmNvbS9pbnRlbnQvdHdlZXQvP3RleHQ9QSUyMGN1cmUlMjBmb3IlMjBjYWNoZS1wb2lzb24lMkMlMjBNZXRhJUUyJTgwJTk5cyUyMGNhbm5hYmlzLWluZnVzZWQlMjBkYXRhYmFzZSUyMHByb3h5JTJDJTIwYW5kJTIwaG93JTIwYSUyMGhpbnQlMjBvZiUyME1hcnhpc20lMjBjb3VsZCUyMGZpeCUyMG9wZW4lMjBzb3VyY2UuJnVybD1odHRwcyUzQSUyRiUyRmJ5dGVzLmRldiUyRmFyY2hpdmVzJTJGNTIx" rel="noopener" style="color: #12b5e5; font-weight: 600; padding-left: 5px; text-decoration: none;" target="_blank" url-id="1886871842"><img alt="" style="display: inline-block; max-width: 100%; width: 32px;" width="25" src="https://bytes.dev/images/tw-share-icon.png"></a><a href="https://c5e21242.click.convertkit-mail.com/r8u3l3erqqhoh3pqmrmf2hdx44d42h7h4n26/9qhzhdud573933f9h3/bWFpbHRvOj9zdWJqZWN0PVlvdSUyMGxpa2UlMjBjb3JuYnJlYWQlM0YmYm9keT1UaG91Z2h0JTIweW91JTI3ZCUyMGxvdmUlMjB0aGlzJTIwd2VlayUyN3MlMjBCeXRlcyUwQS0tLSUwQUElMjBjdXJlJTIwZm9yJTIwY2FjaGUtcG9pc29uJTJDJTIwTWV0YSVFMiU4MCU5OXMlMjBjYW5uYWJpcy1pbmZ1c2VkJTIwZGF0YWJhc2UlMjBwcm94eSUyQyUyMGFuZCUyMGhvdyUyMGElMjBoaW50JTIwb2YlMjBNYXJ4aXNtJTIwY291bGQlMjBmaXglMjBvcGVuJTIwc291cmNlLiUwQWh0dHBzJTNBJTJGJTJGYnl0ZXMuZGV2JTJGYXJjaGl2ZXMlMkY1MjE=" rel="noopener" style="color: #12b5e5; font-weight: 600; padding-left: 5px; text-decoration: none;" target="_blank" url-id="1886871844"><img alt="" style="display: inline-block; max-width: 100%; width: 32px;" width="25" src="https://bytes.dev/images/em-share-icon.png"></a>
</td></tr></tbody></table>
<hr style="border: 0; border-bottom: 5px solid; border-color: #f5f5f5; margin-bottom: 100px; margin-top: 100px;">
<div style="text-align:center;margin-bottom:36px">
<img width="150" src="https://bytes.dev/images/content/sonar-logo.png" alt="Sonar logo" style="max-width: 100%;"><h2 style="font-family: Paytone One, sans-serif; font-size: 28px; margin-top: 10px; text-transform: uppercase;"><span>Our Friends <br class="mobile-break">(With Benefits)</span></h2>
</div>
<div class="bg-alt" style="background-color: #f5f5f5; border-radius: 16px; margin-bottom: 40px; max-width: 100%; padding: 24px; padding-bottom: 12px;">
<img src="https://bytes.dev/images/content/long-tie.jpg" alt="A man wearing an extremely long necktie that trails far below his waist" width="600" style="border-radius: 5px; max-width: 100%;"><p style="font-family: Outfit, sans-serif; font-size: 17px; font-style: italic; line-height: 1; margin: 0; padding-bottom: 4px; padding-left: 24px; padding-right: 24px; padding-top: 10px; text-align: center;">When you catch CVEs but miss that your app allows stacked discounts<!-- --> </p>
</div>
<h3 style="font-size: 24px; margin-bottom: 0; padding-left: 24px; padding-right: 24px;"><a href="https://c5e21242.click.convertkit-mail.com/r8u3l3erqqhoh3pqmrmf2hdx44d42h7h4n26/3ohphdu3pw9z9nirhn/aHR0cHM6Ly9mYW5kZi5jby8zVUtINGRL" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1886871845">SonarQube Hunter Agent: Your On Demand Security Researcher</a></h3>
<p style="font-family: Outfit, sans-serif; font-size: 19px; line-height: 1.5; padding-left: 24px; padding-right: 24px;">Static analysis and algorithmic testing are essential tools for finding vulnerabilities like SQL injections or known CVEs, but they don’t understand your application’s context or business intent.</p>
<p style="font-family: Outfit, sans-serif; font-size: 19px; line-height: 1.5; padding-left: 24px; padding-right: 24px;">That’s why Sonar created <a href="https://c5e21242.click.convertkit-mail.com/r8u3l3erqqhoh3pqmrmf2hdx44d42h7h4n26/3ohphdu3pw9z9nirhn/aHR0cHM6Ly9mYW5kZi5jby8zVUtINGRL" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1886871845">SonarQube Hunter Agent</a>, an automated security researcher that explores your codebase and finds the issues you’ve probably missed.</p>
<p style="font-family: Outfit, sans-serif; font-size: 19px; line-height: 1.5; padding-left: 24px; padding-right: 24px;">It comes with:</p>
<ul>
<li>
<p style="font-family: Outfit, sans-serif; font-size: 19px; line-height: 1.5;"><strong style="font-weight: 600;">Intent-based vulnerability detection:</strong> It finds costly business logic flaws like stacked coupons or missing rate limits, and protects your app from privilege escalation bugs</p>
</li>
<li>
<p style="font-family: Outfit, sans-serif; font-size: 19px; line-height: 1.5;"><strong style="font-weight: 600;">Consistent, auditable findings:</strong> Hunter Agent is designed to deliver reproducible results that teams can review, prioritize, and act on with confidence</p>
</li>
<li>
<p style="font-family: Outfit, sans-serif; font-size: 19px; line-height: 1.5;"><strong style="font-weight: 600;">Seamless Integration:</strong> You can run Hunter Agent analyses on demand or on a schedule, then review findings in SonarQube with clear context and guidance for fixing them</p>
</li>
</ul>
<p style="font-family: Outfit, sans-serif; font-size: 19px; line-height: 1.5; padding-left: 24px; padding-right: 24px;"><a href="https://c5e21242.click.convertkit-mail.com/r8u3l3erqqhoh3pqmrmf2hdx44d42h7h4n26/3ohphdu3pw9z9nirhn/aHR0cHM6Ly9mYW5kZi5jby8zVUtINGRL" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1886871845">Try SonarQube Hunter Agent today</a> – it’s already surfaced over 200 zero days in open source projects.</p>
<hr style="border: 0; border-bottom: 5px solid; border-color: #f5f5f5; margin-bottom: 100px; margin-top: 100px;">
<div style="text-align:center;margin-bottom:36px">
<img width="110" src="https://bytes.dev/images/content/spot-the-bug.png" alt="Spot the Bug logo" style="max-width: 100%;"><h2 style="font-family: Paytone One, sans-serif; font-size: 28px; margin-top: 10px; text-transform: uppercase;">Spot the Bug</h2>
<div class="section-presenter" style="margin-bottom:50px;margin-top:15px">
<h4 style="font-size: 20px; margin-bottom: 0; padding-left: 24px; padding-right: 24px;">Spot the Bug – Sponsored by <a href="https://c5e21242.click.convertkit-mail.com/r8u3l3erqqhoh3pqmrmf2hdx44d42h7h4n26/n2hohquv7d5r5os6hg/aHR0cHM6Ly9vcmtlcy5pby8=" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1886871846">Orkes</a>
</h4>
<p style="font-family: Outfit, sans-serif; font-size: 18px; line-height: 1.5; margin-top: 5px; padding-left: 24px; padding-right: 24px;"><em>It’s an open-source <a href="https://c5e21242.click.convertkit-mail.com/r8u3l3erqqhoh3pqmrmf2hdx44d42h7h4n26/n2hohquv7d5r5os6hg/aHR0cHM6Ly9vcmtlcy5pby8=" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1886871846">agentic workflow platform</a> that lets you easily build agents and workflows, run them durably, and observe and control them through every step. Used by Netflix, Tesla, LinkedIn, and more.</em></p>
</div>
</div>
<pre class="language-js" style="-moz-hyphens: none; -moz-tab-size: 2; -ms-hyphens: none; -o-tab-size: 2; -webkit-hyphens: none; background-color: #f9f9f9; border: 1px solid #f9f9f9; border-radius: 8px; color: #c0c5ce; direction: ltr; font-family: 'Fira Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 15px; hyphens: none; line-height: 1.5; overflow: auto; padding: 24px; tab-size: 2; text-align: left; white-space: pre; word-break: normal; word-spacing: normal;"><code class="language-js" style="-moz-hyphens: none; -moz-tab-size: 2; -ms-hyphens: none; -o-tab-size: 2; -webkit-hyphens: none; color: #c0c5ce; direction: ltr; font-family: 'Fira Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 15px; hyphens: none; line-height: 1.5; tab-size: 2; text-align: left; white-space: pre; word-break: normal; word-spacing: normal;"><span class="token keyword" style="color: #f38ba3; font-size: 15px;">const</span> products <span class="token operator" style="color: #12b5e5; font-size: 15px;">=</span> <span class="token punctuation" style="color: #231F20; font-size: 15px;">{</span>
<span class="token constant" style="color: #12b5e5; font-size: 15px;">SKU12345</span><span class="token operator" style="color: #12b5e5; font-size: 15px;">:</span> <span class="token punctuation" style="color: #231F20; font-size: 15px;">{</span> <span class="token literal-property property" style="color: #12b5e5; font-size: 15px;">name</span><span class="token operator" style="color: #12b5e5; font-size: 15px;">:</span> <span class="token string" style="color: #f99157; font-size: 15px;">"Laptop"</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">,</span> <span class="token literal-property property" style="color: #12b5e5; font-size: 15px;">price</span><span class="token operator" style="color: #12b5e5; font-size: 15px;">:</span> <span class="token number" style="color: #fcba28; font-size: 15px;">999</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">,</span> <span class="token literal-property property" style="color: #12b5e5; font-size: 15px;">discount</span><span class="token operator" style="color: #12b5e5; font-size: 15px;">:</span> <span class="token number" style="color: #fcba28; font-size: 15px;">0.1</span> <span class="token punctuation" style="color: #231F20; font-size: 15px;">}</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">,</span>
<span class="token constant" style="color: #12b5e5; font-size: 15px;">SKU67890</span><span class="token operator" style="color: #12b5e5; font-size: 15px;">:</span> <span class="token punctuation" style="color: #231F20; font-size: 15px;">{</span> <span class="token literal-property property" style="color: #12b5e5; font-size: 15px;">name</span><span class="token operator" style="color: #12b5e5; font-size: 15px;">:</span> <span class="token string" style="color: #f99157; font-size: 15px;">"Phone"</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">,</span> <span class="token literal-property property" style="color: #12b5e5; font-size: 15px;">price</span><span class="token operator" style="color: #12b5e5; font-size: 15px;">:</span> <span class="token number" style="color: #fcba28; font-size: 15px;">499</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">,</span> <span class="token literal-property property" style="color: #12b5e5; font-size: 15px;">discount</span><span class="token operator" style="color: #12b5e5; font-size: 15px;">:</span> <span class="token number" style="color: #fcba28; font-size: 15px;">0</span> <span class="token punctuation" style="color: #231F20; font-size: 15px;">}</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">,</span>
<span class="token constant" style="color: #12b5e5; font-size: 15px;">SKU54321</span><span class="token operator" style="color: #12b5e5; font-size: 15px;">:</span> <span class="token punctuation" style="color: #231F20; font-size: 15px;">{</span> <span class="token literal-property property" style="color: #12b5e5; font-size: 15px;">name</span><span class="token operator" style="color: #12b5e5; font-size: 15px;">:</span> <span class="token string" style="color: #f99157; font-size: 15px;">"Tablet"</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">,</span> <span class="token literal-property property" style="color: #12b5e5; font-size: 15px;">price</span><span class="token operator" style="color: #12b5e5; font-size: 15px;">:</span> <span class="token number" style="color: #fcba28; font-size: 15px;">299</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">,</span> <span class="token literal-property property" style="color: #12b5e5; font-size: 15px;">discount</span><span class="token operator" style="color: #12b5e5; font-size: 15px;">:</span> <span class="token number" style="color: #fcba28; font-size: 15px;">0.05</span> <span class="token punctuation" style="color: #231F20; font-size: 15px;">}</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">,</span>
<span class="token punctuation" style="color: #231F20; font-size: 15px;">}</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">;</span>
<span class="token keyword" style="color: #f38ba3; font-size: 15px;">function</span> <span class="token function" style="color: #9d7dce; font-size: 15px;">printFormattedProductDetails</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">(</span><span class="token parameter" style="color: #f38ba3; font-size: 15px;">products</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">)</span> <span class="token punctuation" style="color: #231F20; font-size: 15px;">{</span>
<span class="token keyword" style="color: #f38ba3; font-size: 15px;">for</span> <span class="token punctuation" style="color: #231F20; font-size: 15px;">(</span><span class="token keyword" style="color: #f38ba3; font-size: 15px;">const</span> product <span class="token keyword" style="color: #f38ba3; font-size: 15px;">in</span> products<span class="token punctuation" style="color: #231F20; font-size: 15px;">)</span> <span class="token punctuation" style="color: #231F20; font-size: 15px;">{</span>
<span class="token keyword" style="color: #f38ba3; font-size: 15px;">const</span> <span class="token punctuation" style="color: #231F20; font-size: 15px;">{</span> name<span class="token punctuation" style="color: #231F20; font-size: 15px;">,</span> price<span class="token punctuation" style="color: #231F20; font-size: 15px;">,</span> discount <span class="token punctuation" style="color: #231F20; font-size: 15px;">}</span> <span class="token operator" style="color: #12b5e5; font-size: 15px;">=</span> product<span class="token punctuation" style="color: #231F20; font-size: 15px;">;</span>
<span class="token keyword" style="color: #f38ba3; font-size: 15px;">let</span> finalPrice <span class="token operator" style="color: #12b5e5; font-size: 15px;">=</span> price<span class="token punctuation" style="color: #231F20; font-size: 15px;">;</span>
<span class="token keyword" style="color: #f38ba3; font-size: 15px;">if</span> <span class="token punctuation" style="color: #231F20; font-size: 15px;">(</span>discount<span class="token punctuation" style="color: #231F20; font-size: 15px;">)</span> <span class="token punctuation" style="color: #231F20; font-size: 15px;">{</span>
finalPrice <span class="token operator" style="color: #12b5e5; font-size: 15px;">=</span> price <span class="token operator" style="color: #12b5e5; font-size: 15px;">-</span> price <span class="token operator" style="color: #12b5e5; font-size: 15px;">*</span> discount<span class="token punctuation" style="color: #231F20; font-size: 15px;">;</span>
<span class="token punctuation" style="color: #231F20; font-size: 15px;">}</span>
console<span class="token punctuation" style="color: #231F20; font-size: 15px;">.</span><span class="token function" style="color: #9d7dce; font-size: 15px;">log</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">(</span>
<span class="token template-string" style="font-size: 15px;"><span class="token template-punctuation string" style="color: #f99157; font-size: 15px;">`</span><span class="token string" style="color: #f99157; font-size: 15px;">Product: </span><span class="token interpolation" style="color: #12b5e5; font-size: 15px;"><span class="token interpolation-punctuation punctuation" style="color: #231F20; font-size: 15px;">${</span>name<span class="token interpolation-punctuation punctuation" style="color: #231F20; font-size: 15px;">}</span></span><span class="token string" style="color: #f99157; font-size: 15px;">, Price: </span><span class="token interpolation" style="color: #12b5e5; font-size: 15px;"><span class="token interpolation-punctuation punctuation" style="color: #231F20; font-size: 15px;">${</span>finalPrice<span class="token punctuation" style="color: #231F20; font-size: 15px;">.</span><span class="token function" style="color: #9d7dce; font-size: 15px;">toLocaleString</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">(</span><span class="token string" style="color: #f99157; font-size: 15px;">"en-US"</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">,</span> <span class="token punctuation" style="color: #231F20; font-size: 15px;">{</span>
<span class="token literal-property property" style="color: #12b5e5; font-size: 15px;">style</span><span class="token operator" style="color: #12b5e5; font-size: 15px;">:</span> <span class="token string" style="color: #f99157; font-size: 15px;">"currency"</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">,</span>
<span class="token literal-property property" style="color: #12b5e5; font-size: 15px;">currency</span><span class="token operator" style="color: #12b5e5; font-size: 15px;">:</span> <span class="token string" style="color: #f99157; font-size: 15px;">"USD"</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">,</span>
<span class="token punctuation" style="color: #231F20; font-size: 15px;">}</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">)</span><span class="token interpolation-punctuation punctuation" style="color: #231F20; font-size: 15px;">}</span></span><span class="token template-punctuation string" style="color: #f99157; font-size: 15px;">`</span></span>
<span class="token punctuation" style="color: #231F20; font-size: 15px;">)</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">;</span>
<span class="token punctuation" style="color: #231F20; font-size: 15px;">}</span>
<span class="token punctuation" style="color: #231F20; font-size: 15px;">}</span>
<span class="token function" style="color: #9d7dce; font-size: 15px;">printFormattedProductDetails</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">(</span>products<span class="token punctuation" style="color: #231F20; font-size: 15px;">)</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">;</span>
</code></pre>
<hr style="border: 0; border-bottom: 5px solid; border-color: #f5f5f5; margin-bottom: 100px; margin-top: 100px;">
<div style="text-align:center;margin-bottom:36px">
<img width="110" src="https://bytes.dev/images/content/cool-bits.png" alt="Cool Bits logo" style="max-width: 100%;"><h2 style="font-family: Paytone One, sans-serif; font-size: 28px; margin-top: 10px; text-transform: uppercase;">Cool Bits</h2>
</div>
<ol>
<li>
<p style="font-family: Outfit, sans-serif; font-size: 19px; line-height: 1.5;">Fatih Arslan <a href="https://c5e21242.click.convertkit-mail.com/r8u3l3erqqhoh3pqmrmf2hdx44d42h7h4n26/48hvh7umxoqgq0axh7/aHR0cHM6Ly9hcnNsYW4uaW8vMjAyNi8wOS8xMS9ob3ctaS1tYW5hZ2UtbXktYWdlbnRzLw==" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1886871847">wrote about how he manages his agents</a>, a post you’ve read a million times, but this time from an engineer at Cursor who actually knows what he’s doing.</p>
</li>
<li>
<p style="font-family: Outfit, sans-serif; font-size: 19px; line-height: 1.5;">It only took Shopify 12 weeks to <a href="https://c5e21242.click.convertkit-mail.com/r8u3l3erqqhoh3pqmrmf2hdx44d42h7h4n26/wnh2h6uq0zvgvwh7hx/aHR0cHM6Ly9zaG9waWZ5LmVuZ2luZWVyaW5nL3Nob3AtYXBwLW1pZ3JhdGlvbg==" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1886871848">migrate the Shop app from React Native to Swift/Kotlin</a> leaving the React Native Stans in shambles.</p>
</li>
<li>
<p style="font-family: Outfit, sans-serif; font-size: 19px; line-height: 1.5;">Only idiots write manual tests – modern engineering teams like Notion, Dropbox and LaunchDarkly use Meticulous to maintain e2e UI tests that <a href="https://c5e21242.click.convertkit-mail.com/r8u3l3erqqhoh3pqmrmf2hdx44d42h7h4n26/reh8h9um68vxvmh2h6/aHR0cHM6Ly93d3cubWV0aWN1bG91cy5haS8_dXRtX3NvdXJjZT1ieXRlcyZ1dG1fbWVkaXVtPW5ld3NsZXR0ZXImdXRtX2NhbXBhaWduPTI2cTMmdXRtX2NvbnRlbnQ9c2Vjb25kYXJ5" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1886871849">cover every edge case of your web app</a>. [sponsored]</p>
</li>
<li>
<p style="font-family: Outfit, sans-serif; font-size: 19px; line-height: 1.5;">Vercel made <a href="https://c5e21242.click.convertkit-mail.com/r8u3l3erqqhoh3pqmrmf2hdx44d42h7h4n26/08hwhgu2l8wzwgblh5/aHR0cHM6Ly92ZXJjZWwuY29tL2xhYnM=" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1886871850">a cool website</a> to showcase their R&D projects that their “Labs” team has been working on.</p>
</li>
<li>
<p style="font-family: Outfit, sans-serif; font-size: 19px; line-height: 1.5;">Lovable used <code style="font-size: 15px;">oj</code> <a href="https://c5e21242.click.convertkit-mail.com/r8u3l3erqqhoh3pqmrmf2hdx44d42h7h4n26/8ghqh3uor4p9p9bkh9/aHR0cHM6Ly9sb3ZhYmxlLmRldi9ibG9nL2Zhc3Rlci1wcmV2aWV3cy1vag==" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1886871851">to improve their preview sandbox cold starts</a> from 4.9s with <code style="font-size: 15px;">vite</code> to 1.2s and reduced their memory usage by 84%.</p>
</li>
<li>
<p style="font-family: Outfit, sans-serif; font-size: 19px; line-height: 1.5;">The engineers at Meta wrote <a href="https://c5e21242.click.convertkit-mail.com/r8u3l3erqqhoh3pqmrmf2hdx44d42h7h4n26/vqh3hmuow53g38hghl/aHR0cHM6Ly9lbmdpbmVlcmluZy5mYi5jb20vMjAyNi8wOS8wMy9jb3JlLWluZnJhL3pnYXRld2F5LXByb3h5LXppcHB5ZGItbWV0YS8=" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1886871852">a post about ZGateway and proxying traffic to ZippyDB</a>. I’m pretty sure I saw a billboard for a cannabis store that was selling ZippyDBs. Coincidence?</p>
</li>
<li>
<p style="font-family: Outfit, sans-serif; font-size: 19px; line-height: 1.5;">Convex created <a href="https://c5e21242.click.convertkit-mail.com/r8u3l3erqqhoh3pqmrmf2hdx44d42h7h4n26/l2heh6ulxgvrvqt6h0/aHR0cHM6Ly9naXRodWIuY29tL2dldC1jb252ZXgvY29udmV4LWFnZW50LXBsdWdpbnM=" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1886871853">an official set of plugins</a> for AI agents that includes skills, custom agents, MCP integrations and more to help you <a href="https://c5e21242.click.convertkit-mail.com/r8u3l3erqqhoh3pqmrmf2hdx44d42h7h4n26/m2h7h6u34r0e0vimhq/aHR0cHM6Ly93d3cuY29udmV4LmRldi9haQ==" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1886871854">build better apps</a>. [sponsored]</p>
</li>
<li>
<p style="font-family: Outfit, sans-serif; font-size: 19px; line-height: 1.5;">Laurie Voss <a href="https://c5e21242.click.convertkit-mail.com/r8u3l3erqqhoh3pqmrmf2hdx44d42h7h4n26/dphehmuep3w5w6hmh4/aHR0cHM6Ly9zZWxkby5jb20vcG9zdHMvbm9ib2R5LXBheXMtZm9yLW9wZW4tc291cmNlLXdlLWNhbi1mb3JjZS10aGVtLXRvLw==" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1886871855">cracked the code for how to get everyone paid in open source</a>. Private registries with a hint of Marxism are VERY on brand.</p>
</li>
<li>
<p style="font-family: Outfit, sans-serif; font-size: 19px; line-height: 1.5;">GitHub Actions added <a href="https://c5e21242.click.convertkit-mail.com/r8u3l3erqqhoh3pqmrmf2hdx44d42h7h4n26/e0hph0u7rxw4wot8h2/aHR0cHM6Ly9naXRodWIuYmxvZy9jaGFuZ2Vsb2cvMjAyNi0wOS0xMC1jb250cm9sLWdpdGh1Yi1hY3Rpb25zLWNhY2hlLWFjY2Vzcy13aXRoLWNhY2hlLW1vZGUv" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1886871856">cache-mode</a> to save you from cache-poisoning.</p>
</li>
<li>
<p style="font-family: Outfit, sans-serif; font-size: 19px; line-height: 1.5;">Dominic Gannaway <a href="https://c5e21242.click.convertkit-mail.com/r8u3l3erqqhoh3pqmrmf2hdx44d42h7h4n26/7qh7h2u9ngpzp7bzh6/aHR0cHM6Ly90c3J4LmRldi9ibG9nL3JlbW92aW5nLWxhenktZGVzdHJ1Y3R1cmluZw==" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1886871857">removed lazy destructuring from <code style="font-size: 15px;">tsrx</code></a> which means we’re only a few more cuts away from it going back to just being JSX.</p>
</li>
</ol>
<hr style="border: 0; border-bottom: 5px solid; border-color: #f5f5f5; margin-bottom: 100px; margin-top: 100px;">
<div style="text-align:center;margin-bottom:36px">
<img width="110" src="https://bytes.dev/images/content/spot-the-bug.png" alt="Spot the Bug logo" style="max-width: 100%;"><h2 style="font-family: Paytone One, sans-serif; font-size: 28px; margin-top: 10px; text-transform: uppercase;">Spot the Bug: Solution</h2>
<div class="section-presenter" style="margin-bottom:50px;margin-top:15px"><h4 style="font-size: 20px; margin-bottom: 0; padding-left: 24px; padding-right: 24px;">Spot the Bug – Sponsored by <a href="https://c5e21242.click.convertkit-mail.com/r8u3l3erqqhoh3pqmrmf2hdx44d42h7h4n26/n2hohquv7d5r5os6hg/aHR0cHM6Ly9vcmtlcy5pby8=" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1886871846">Orkes</a>
</h4></div>
</div>
<p style="font-family: Outfit, sans-serif; font-size: 19px; line-height: 1.5; padding-left: 24px; padding-right: 24px;">The <code style="font-size: 15px;">for ... in</code> loop iterates over the keys of the object, not the values. This results in a TypeError. To fix this, we need to access the value of the key in the object.</p>
<pre class="language-js" style="-moz-hyphens: none; -moz-tab-size: 2; -ms-hyphens: none; -o-tab-size: 2; -webkit-hyphens: none; background-color: #f9f9f9; border: 1px solid #f9f9f9; border-radius: 8px; color: #c0c5ce; direction: ltr; font-family: 'Fira Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 15px; hyphens: none; line-height: 1.5; overflow: auto; padding: 24px; tab-size: 2; text-align: left; white-space: pre; word-break: normal; word-spacing: normal;"><code class="language-js" style="-moz-hyphens: none; -moz-tab-size: 2; -ms-hyphens: none; -o-tab-size: 2; -webkit-hyphens: none; color: #c0c5ce; direction: ltr; font-family: 'Fira Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 15px; hyphens: none; line-height: 1.5; tab-size: 2; text-align: left; white-space: pre; word-break: normal; word-spacing: normal;"><span class="token keyword" style="color: #f38ba3; font-size: 15px;">const</span> products <span class="token operator" style="color: #12b5e5; font-size: 15px;">=</span> <span class="token punctuation" style="color: #231F20; font-size: 15px;">{</span>
<span class="token constant" style="color: #12b5e5; font-size: 15px;">SKU12345</span><span class="token operator" style="color: #12b5e5; font-size: 15px;">:</span> <span class="token punctuation" style="color: #231F20; font-size: 15px;">{</span> <span class="token literal-property property" style="color: #12b5e5; font-size: 15px;">name</span><span class="token operator" style="color: #12b5e5; font-size: 15px;">:</span> <span class="token string" style="color: #f99157; font-size: 15px;">"Laptop"</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">,</span> <span class="token literal-property property" style="color: #12b5e5; font-size: 15px;">price</span><span class="token operator" style="color: #12b5e5; font-size: 15px;">:</span> <span class="token number" style="color: #fcba28; font-size: 15px;">999</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">,</span> <span class="token literal-property property" style="color: #12b5e5; font-size: 15px;">discount</span><span class="token operator" style="color: #12b5e5; font-size: 15px;">:</span> <span class="token number" style="color: #fcba28; font-size: 15px;">0.1</span> <span class="token punctuation" style="color: #231F20; font-size: 15px;">}</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">,</span>
<span class="token constant" style="color: #12b5e5; font-size: 15px;">SKU67890</span><span class="token operator" style="color: #12b5e5; font-size: 15px;">:</span> <span class="token punctuation" style="color: #231F20; font-size: 15px;">{</span> <span class="token literal-property property" style="color: #12b5e5; font-size: 15px;">name</span><span class="token operator" style="color: #12b5e5; font-size: 15px;">:</span> <span class="token string" style="color: #f99157; font-size: 15px;">"Phone"</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">,</span> <span class="token literal-property property" style="color: #12b5e5; font-size: 15px;">price</span><span class="token operator" style="color: #12b5e5; font-size: 15px;">:</span> <span class="token number" style="color: #fcba28; font-size: 15px;">499</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">,</span> <span class="token literal-property property" style="color: #12b5e5; font-size: 15px;">discount</span><span class="token operator" style="color: #12b5e5; font-size: 15px;">:</span> <span class="token number" style="color: #fcba28; font-size: 15px;">0</span> <span class="token punctuation" style="color: #231F20; font-size: 15px;">}</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">,</span>
<span class="token constant" style="color: #12b5e5; font-size: 15px;">SKU54321</span><span class="token operator" style="color: #12b5e5; font-size: 15px;">:</span> <span class="token punctuation" style="color: #231F20; font-size: 15px;">{</span> <span class="token literal-property property" style="color: #12b5e5; font-size: 15px;">name</span><span class="token operator" style="color: #12b5e5; font-size: 15px;">:</span> <span class="token string" style="color: #f99157; font-size: 15px;">"Tablet"</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">,</span> <span class="token literal-property property" style="color: #12b5e5; font-size: 15px;">price</span><span class="token operator" style="color: #12b5e5; font-size: 15px;">:</span> <span class="token number" style="color: #fcba28; font-size: 15px;">299</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">,</span> <span class="token literal-property property" style="color: #12b5e5; font-size: 15px;">discount</span><span class="token operator" style="color: #12b5e5; font-size: 15px;">:</span> <span class="token number" style="color: #fcba28; font-size: 15px;">0.05</span> <span class="token punctuation" style="color: #231F20; font-size: 15px;">}</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">,</span>
<span class="token punctuation" style="color: #231F20; font-size: 15px;">}</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">;</span>
<span class="token keyword" style="color: #f38ba3; font-size: 15px;">function</span> <span class="token function" style="color: #9d7dce; font-size: 15px;">printFormattedProductDetails</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">(</span><span class="token parameter" style="color: #f38ba3; font-size: 15px;">products</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">)</span> <span class="token punctuation" style="color: #231F20; font-size: 15px;">{</span>
<span class="token keyword" style="color: #f38ba3; font-size: 15px;">for</span> <span class="token punctuation" style="color: #231F20; font-size: 15px;">(</span><span class="token keyword" style="color: #f38ba3; font-size: 15px;">const</span> product <span class="token keyword" style="color: #f38ba3; font-size: 15px;">in</span> products<span class="token punctuation" style="color: #231F20; font-size: 15px;">)</span> <span class="token punctuation" style="color: #231F20; font-size: 15px;">{</span>
<span class="token keyword" style="color: #f38ba3; font-size: 15px;">const</span> <span class="token punctuation" style="color: #231F20; font-size: 15px;">{</span> name<span class="token punctuation" style="color: #231F20; font-size: 15px;">,</span> price<span class="token punctuation" style="color: #231F20; font-size: 15px;">,</span> discount <span class="token punctuation" style="color: #231F20; font-size: 15px;">}</span> <span class="token operator" style="color: #12b5e5; font-size: 15px;">=</span> products<span class="token punctuation" style="color: #231F20; font-size: 15px;">[</span>product<span class="token punctuation" style="color: #231F20; font-size: 15px;">]</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">;</span>
<span class="token keyword" style="color: #f38ba3; font-size: 15px;">let</span> finalPrice <span class="token operator" style="color: #12b5e5; font-size: 15px;">=</span> price<span class="token punctuation" style="color: #231F20; font-size: 15px;">;</span>
<span class="token keyword" style="color: #f38ba3; font-size: 15px;">if</span> <span class="token punctuation" style="color: #231F20; font-size: 15px;">(</span>discount<span class="token punctuation" style="color: #231F20; font-size: 15px;">)</span> <span class="token punctuation" style="color: #231F20; font-size: 15px;">{</span>
finalPrice <span class="token operator" style="color: #12b5e5; font-size: 15px;">=</span> price <span class="token operator" style="color: #12b5e5; font-size: 15px;">-</span> price <span class="token operator" style="color: #12b5e5; font-size: 15px;">*</span> discount<span class="token punctuation" style="color: #231F20; font-size: 15px;">;</span>
<span class="token punctuation" style="color: #231F20; font-size: 15px;">}</span>
console<span class="token punctuation" style="color: #231F20; font-size: 15px;">.</span><span class="token function" style="color: #9d7dce; font-size: 15px;">log</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">(</span>
<span class="token template-string" style="font-size: 15px;"><span class="token template-punctuation string" style="color: #f99157; font-size: 15px;">`</span><span class="token string" style="color: #f99157; font-size: 15px;">Product: </span><span class="token interpolation" style="color: #12b5e5; font-size: 15px;"><span class="token interpolation-punctuation punctuation" style="color: #231F20; font-size: 15px;">${</span>name<span class="token interpolation-punctuation punctuation" style="color: #231F20; font-size: 15px;">}</span></span><span class="token string" style="color: #f99157; font-size: 15px;">, Price: </span><span class="token interpolation" style="color: #12b5e5; font-size: 15px;"><span class="token interpolation-punctuation punctuation" style="color: #231F20; font-size: 15px;">${</span>finalPrice<span class="token punctuation" style="color: #231F20; font-size: 15px;">.</span><span class="token function" style="color: #9d7dce; font-size: 15px;">toLocaleString</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">(</span><span class="token string" style="color: #f99157; font-size: 15px;">"en-US"</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">,</span> <span class="token punctuation" style="color: #231F20; font-size: 15px;">{</span>
<span class="token literal-property property" style="color: #12b5e5; font-size: 15px;">style</span><span class="token operator" style="color: #12b5e5; font-size: 15px;">:</span> <span class="token string" style="color: #f99157; font-size: 15px;">"currency"</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">,</span>
<span class="token literal-property property" style="color: #12b5e5; font-size: 15px;">currency</span><span class="token operator" style="color: #12b5e5; font-size: 15px;">:</span> <span class="token string" style="color: #f99157; font-size: 15px;">"USD"</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">,</span>
<span class="token punctuation" style="color: #231F20; font-size: 15px;">}</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">)</span><span class="token interpolation-punctuation punctuation" style="color: #231F20; font-size: 15px;">}</span></span><span class="token template-punctuation string" style="color: #f99157; font-size: 15px;">`</span></span>
<span class="token punctuation" style="color: #231F20; font-size: 15px;">)</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">;</span>
<span class="token punctuation" style="color: #231F20; font-size: 15px;">}</span>
<span class="token punctuation" style="color: #231F20; font-size: 15px;">}</span>
<span class="token function" style="color: #9d7dce; font-size: 15px;">printFormattedProductDetails</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">(</span>products<span class="token punctuation" style="color: #231F20; font-size: 15px;">)</span><span class="token punctuation" style="color: #231F20; font-size: 15px;">;</span>
</code></pre>
<div style="text-align:center;padding-bottom:80px;padding-top:80px">
<div class="bg-alt" style="background-color: #f5f5f5; border-radius: 16px; margin-bottom: 40px; padding: 24px;"><div style="margin-top:-40px">
<img src="https://bytes.dev/images/bytes-icon.png" alt="Bytes" width="55px" style="max-width: 100%; width: 55px;"><h5 style="font-size:18px;font-weight:400;margin-bottom:24px">Want us to say nice things <br> about your company?</h5>
<div style="margin-bottom:16px"><a style="background-color: #FCBA28; border: 1px solid #231F20; border-radius: 100px; color: #231F20; font-size: 14px; font-weight: 600; padding: 8px 14px; text-decoration: none;" href="https://c5e21242.click.convertkit-mail.com/r8u3l3erqqhoh3pqmrmf2hdx44d42h7h4n26/owhkhwuwqzlolmtvhr/aHR0cHM6Ly9ieXRlcy5kZXYvYWR2ZXJ0aXNl" url-id="1886871858">Sponsor Bytes</a></div>
<div style="margin-bottom:20px"><a style="color: #FCBA28; font-size: 14px; font-weight: 600; text-decoration: underline;" href="https://c5e21242.click.convertkit-mail.com/r8u3l3erqqhoh3pqmrmf2hdx44d42h7h4n26/z2hgh7uelgrwrqtph0/aHR0cHM6Ly9ieXRlcy5kZXYvc2hhcmU=" url-id="1886871859">or share it</a></div>
<p style="font-family: Outfit, sans-serif; font-size: 14px; line-height: 1.5; padding-left: 24px; padding-right: 24px;">Built with ❤️ by<!-- --> <a style="color: #ed203d; font-weight: 600; text-decoration: underline;" href="https://c5e21242.click.convertkit-mail.com/r8u3l3erqqhoh3pqmrmf2hdx44d42h7h4n26/p8hehqu4qv5x5qcqh3/aHR0cHM6Ly9maXJlc2hpcC5kZXY=" url-id="1886871860">Fireship</a></p>
</div></div>
<p style="font-family: Outfit, sans-serif; font-size: 14px; line-height: 1.5; opacity: 0.5; padding-left: 24px; padding-right: 24px;">50 W Broadway Ste 333 PMB 51647 Salt Lake City, Utah 84101</p>
<div style="font-family:Papyrus, cursive"><a class="unsubscribe-link" href="https://c5e21242.click.convertkit-mail.com/r8u3l3erqqhoh3pqmrmf2hdx44d42h7h4n26/x0hph3ueqgd3d4s5hl/aHR0cHM6Ly9ieXRlcy5kZXYvdW5zdWJzY3JpYmU=" style="color: #9B9890;" url-id="1886871861">Unsubscribe from Bytes</a></div>
</div>
</div></td>
<td style="border-collapse: collapse !important; word-break: normal;"></td>
</tr></tbody></table>
<span style="display: none"><a href="https://c5e21242.unsubscribe.convertkit-mail.com/r8u3l3erqqhoh3pqmrmf2hdx44d42h7h4n26">Unsubscribe</a></span>
<!-- -->
<img src="https://c5e21242.open.convertkit-mail.com/r8u3l3erqqhoh3pqmrmf2hdx44d42h7h4n26" alt="">
</body>
</html>