Back to Browse

Formatting lists and numbers in JavaScript with the Intl API

5.2K views
Mar 4, 2022
7:54

Most of the times when you’re dealing with data as a front-end web dev, you’re either looping through or manipulating data for formatting it to fit your needs. The Intl API provides a built-in way to list array items in natural language or to format currency. I'll show you two of the possible options in this video. Check out additional ones with the doc link below. 🔗 Key Links 🔗 - Blog article: https://chrispennington.blog/blog/listing-array-items-in-natural-language/ - MDN docs for Internationalization API: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl - MDN doc for ListFormat: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat - MDN doc for .toLocaleString: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString --------------------------------------- 🌐 Connect With Me 🌐 - Website: https://www.codinginpublic.dev - Blog: https://www.chrispennington.blog - Twitter: https://twitter.com/cpenned

Download

0 formats

No download links available.

Formatting lists and numbers in JavaScript with the Intl API | NatokHD