---
title: "A JavaScript card trick"
publication: "JavaScript Weekly"
issue: 547
published_at: "2021-07-16"
canonical_url: "https://javascriptweekly.com/issues/547"
---

Plus V8 9.2, the latest from TC39, and simpler JavaScript memoization. |        

#​547 — July 16, 2021 

[Unsubscribe](https://javascriptweekly.com/leave/*|UID|*)|[Read on the Web](https://javascriptweekly.com/issues/547)   

JavaScript Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/bdmkhz0f54ua0ufrb5ti.jpg)](https://v8.dev/blog/v8-release-92)  

[V8 v9.2 and the `at` Function](https://v8.dev/blog/v8-release-92) — Every step forward the popular V8 JavaScript engine takes is news, but this is a relatively minor step with **the biggest practical addition being [the new '`at`' method](https://v8.dev/features/at-method) for Array, TypedArray and String.** Oh, and [Firefox 90 supports it](https://hacks.mozilla.org/2021/07/getting-lively-with-firefox-90/) too, plus a couple of other goodies. 

Ingvar Stepanyan   

[The Road to Ember 4.0](https://blog.emberjs.com/the-road-to-ember-4-0/) — The [Ember.js](https://emberjs.com/) framework is ten years old this year and while it’s not often in the headlines, it’s one of the most solid, reliable and battle tested systems out there and a big update is on the way. 

Matthew Beale   [![\](https://copm.s3.amazonaws.com/eb4bb8c9.png)](https://clubhouse.io/?utm_source=cooperJSWeekly&utm_medium=spon_nl) 

[What If Your Project Management Tool Was Fast and Intuitive?](https://clubhouse.io/?utm_source=cooperJSWeekly&utm_medium=spon_nl) — Imagine how much more you could get done if your project management tools didn't make you sigh. Clubhouse is the ideal solution for task management, bug tracking, iteration planning, and reporting. Delight the scrum gods and give us a try. 

Clubhouse.io sponsor   

[HTM 3.1.0: A JSX Alternative using Standard Tagged Templates](https://github.com/developit/htm) — This clever library has been around a few years but sees an update this week. Think JSX-style syntax but in plain JavaScript (using tagged templates) that requires _no transpilation_ but still supports things like rest spread and referencing components. 

Jason Miller   

[Deno 1.12 Released](https://deno.com/blog/v1.12) — The ‘server side JavaScript runtime that isn’t Node’ takes some more steps forward with TypeScript support in its REPL, improved Web Crypto support, and you can upgrade incoming HTTP requests on the (unstable) HTTP server to WebSocket connections. 

Casonato and Iwańczuk    

**QUICK BITS:** 

- Hemanth HM shares [updates from the latest TC39 meeting](https://dev.to/hemanth/updates-from-the-84th-meeting-of-tc39-c41) and the proposals discussed. He's also published [▶️ a new episode of the TC39er podcast](https://tc39er.us/posts/episode-15-yulia-startsev/) interviewing Mozilla's Yulia Startsev about work on SpiderMonkey.
- Want to perform a card trick with some JavaScript powered 'mind reading'? [▶️ Computerphile has you covered.](https://www.youtube.com/watch?v=rkrjo4IIb1I)
- Did you know you can [get Postgres to return JSON directly?](https://blog.crunchydata.com/blog/generating-json-directly-from-postgres)
- The story of how a developer [bootstrapped his (paid) JavaScript image editing control](https://medium.com/geekculture/how-rik-schennink-bootstrapped-a-javascript-image-editor-to-20k-mrr-b09e75157285) to $20K monthly revenue.
- [Puppy](https://github.com/lmt-swallow/puppy-browser/) is a neat minimal experimental Web browser written in Rust that supports JavaScript via V8.
- It's not JavaScript at all but I was still blown away to learn about [the almost 100 different types of DNS record](https://www.netmeister.org/blog/dns-rrs.html) that exist.   

**RELEASES:** 

[Node 16.5.0](https://nodejs.org/en/blog/release/v16.5.0/) – Now with experimental support for the Web Streams API.
 [Turf.js 6.5](https://github.com/Turfjs/turf) – Geospatial analysis library.
 [node-mongodb-native 4.0](https://github.com/mongodb/node-mongodb-native/releases/tag/v4.0.0) – Big release for the official MongoDB driver.
 [tXml 5.0](https://www.npmjs.com/package/txml) – Fast pure JavaScript XML parser.    

💻 Jobs  

[Senior Frontend Engineer (Remote)](https://unsplash.com/hiring/job-posts/51/senior-front-end-engineer) — We're looking for a Senior Front-End Engineer to join the web team at Unsplash. Small team but big product. Strict TypeScript with plenty of functional programming. 
Unsplash   

[Senior Back-End JavaScript Developer](https://govspend.com/careers/#openpositions) — We’re seeking a developer with experience in full functional programming (Lodash, Ramda & ElasticSearch) to help build the next generation of GovSpend, a civic startup disrupting government procurement. Remote, candidates must be eligible to work in the US. 
Govspend   

[Find a Job Through Hired](https://hired.com/join/?utm_source=newsletter&utm_medium=sponsor&utm_campaign=%28b2c%29%28l-all%29%28r-all%29%28cooper-javascriptweekly%29&utm_content=find-your-next-job) — Create a profile on Hired to connect with hiring managers at growing startups and Fortune 500 companies. It's free for job-seekers. 
Hired    

📖 Articles, Opinions & Tutorials 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/bsvjdkrr1nqyct3nuey6.jpg)](https://www.smashingmagazine.com/2021/07/dynamic-header-intersection-observer/)  

[Building a Dynamic Header with Intersection Observer](https://www.smashingmagazine.com/2021/07/dynamic-header-intersection-observer/) — Ever needed to have a component respond to elements as they’re scrolled to a certain threshold within the viewport? Attaching an event listener to constantly fire on scroll can be performance intensive, but there's a better way.. 

Michelle Barker   

[How to Convert Arrays to Human-Readable Lists](https://www.amitmerchant.com/how-to-convert-arrays-to-human-readable-lists-in-javascript/) — A pretty quick tip here, leaning on `Intl.ListFormat` which deftly takes care of formatting a list in a locally appropriate way. 

Amit Merchant   

▶[Information Foraging: Tricks Great Developers Use to Find Solutions](https://stackoverflow.blog/2021/06/15/podcast-347-information-foraging-the-tactics-great-developers-use-to-find-solutions/) — Professor Austin Henley explains the tactics veteran developers use to quickly find the best solutions. 

Stack Overflow Podcast sponsor   

[The Ultimate Guide to Browser-Side Storage](https://blog.openreplay.com/the-ultimate-guide-to-browser-side-storage) — Does a pretty good job of covering all the options, right from variables through `localStorage` and on up to non-standard browser APIs you probably don’t want to be using. 

Craig Buckler   

[How To Migrate from jQuery to Next.js](https://www.smashingmagazine.com/2021/07/migrate-jquery-nextjs/) — The title put a confused expression on my face when I first saw it, but it’s broadly about going from a jQuery-based approach to a React-based one for common frontend tasks. 

Facundo Giuliani   

[A Checklist for Freelance React Developers](https://www.robinwieruch.de/freelance-react-developer) — Robin covers a variety of things to think about if you’re an independent React developer who needs to seamlessly get involved with existing teams and projects. 

Robin Wieruch   

[How Debugging is Changing: Cut Debugging Time with New Approaches to Tracking/Dealing with Errors](https://try.rollbar.com/ebook/how-debugging-is-changing/?utm_source=newsletter&utm_medium=email&utm_campaign=cooper_press) 

Rollbar sponsorebook   

[Running a Next.js Site on Cloudflare Pages](https://opstrace.com/blog/nextjs-on-cloudflare) 
Patrick Heneise   

[Notion API: Getting Started with Notion's JavaScript SDK](https://www.sitepoint.com/notion-api-javascript-sdk/) 
Rui Sousa   

[Vue 3 Migration Build: Safely Upgrade Your App to Vue 3](https://www.vuemastery.com/blog/vue-3-migration-build/) 
Andy Li   

🛠 Code & Tools  

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/tzqw6zze8tilkwv7sq8i.jpg)](https://j-brooke.github.io/FracturedJson/)  

[FracturedJson: A Browser-Based JSON Formatter](https://j-brooke.github.io/FracturedJson/) — Produces _“human-readable but fairly compact output.”_ I like this. It’s not your typical linter but turns big lumps of JSON into something that it’s pleasant to look through. 

J Brooke   

[mem 9.0: Simple Memoization Library](https://github.com/sindresorhus/mem) — Memoization is an optimization technique used to speed up consecutive function calls by caching the result of calls with identical arguments. 

Sindre Sorhus   

[devcert: Development SSL/TLS Certificates Made Easy](https://www.npmjs.com/package/devcert) — Need a certificate for local development when using Node? This package takes an interesting approach of creating its own root authority and issuing certificates automatically against it. It’s so slick though, I was impressed by it in my tests. 

Dave Wasmer   

[Monitor Lighthouse Scores and Core Web Vitals](https://www.debugbear.com/?utm_campaign=jsWeekly) — DebugBear continuously monitors site speed and provides front-end developers with the data they need to improve it. 

DebugBear sponsor   

[new-tailwind-app: A Node-based CLI to Generate Boilerplate Code for Different Tailwind Apps](https://github.com/msaaddev/new-tailwind-app) — Like create-react-app, but for Tailwind. Start a plain Tailwind project or generate one with based on Next.js, React, Gatsby, or Vue, with Prettier integration. 

Saad Irfan   

[Filesize.js 7.0: A Library to Create Human Readable File Size Strings](https://filesizejs.com/) — For example: `filesize(265318)` returns 259.1 KB. [GitHub repo.](https://github.com/avoidwork/filesize.js) 

Jason Mulligan   

[LiveKit: A Go-Powered Server for Real Time Audio and Video](https://livekit.io/) — An open source infrastructure project for building and scaling realtime WebRTC powered audio and video experiences in apps. It’s new but there are already SDKs for iOS, JavaScript in general, React, and Android. 

LiveKit Team   

[React Virtual 2.8.0: Hooks for Virtualizing Scrollable Elements](https://github.com/tannerlinsley/react-virtual) — With a single headless hook you can work with row, column and grid level virtualization, get imperative scrolling when needed, custom scrolling function support, and more. Lots of [CodeSandbox](https://codesandbox.io/s/github/tannerlinsley/react-virtual/tree/master/examples/variable) [demos](https://codesandbox.io/s/github/tannerlinsley/react-virtual/tree/master/examples/dynamic) here too. 

Tanner Linsley         

Published by [Cooperpress](https://cooperpress.com/) and edited by [Peter Cooper](https://twitter.com/peterc) 

'JavaScript' is a trademark of Oracle Corporation in the US
We are not endorsed by or affiliated with Oracle. 

[Change your email address](https://javascriptweekly.com/edit_subscription/*|UID|*) or [stop getting this newsletter](https://javascriptweekly.com/leave/*|UID|*). 

© Cooper Press Ltd · Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom
