Intl APIs — Complete Guide
Intl APIs — Complete Guide: free step-by-step lesson with examples, common mistakes, and interview tips — part of JavaScript Tutorial on Toolliyo Academy.
On this page
JavaScript Tutorial · Lesson 36 of 100
Intl APIs
Basics ✓ → Objects & data → Async & DOM → Advanced → Tools → Projects
Intermediate · 2 — Built-in types & objects · ~6 min · JS Strings, Dates & RegEx
What is this?
Intl provides built-in formatting for numbers, dates, and currencies by locale — ₹ in India, € in Germany.
Why should you care?
Global apps must show dates and money correctly without hand-rolled strings.
See it live — copy this example
Paste into an HTML file or the browser console (F12). Use Run below when the live editor is available.
const amount = 1234567.89;
console.log(new Intl.NumberFormat("en-IN", { style: "currency", currency: "INR" }).format(amount));
console.log(new Intl.DateTimeFormat("en-IN").format(new Date()));
Run Example »
Edit the code below and click Run to see the result in Toolliyo’s live editor.
What happened?
- NumberFormat and DateTimeFormat use locale rules.
- Pass en-IN for Indian formatting.
Practice next
- Format currency with Intl.NumberFormat en-IN.
- Format today with Intl.DateTimeFormat.
- Try de-DE locale for number style.
- Format a percentage with style: "percent".
- Show compact notation for 1_200_000 with notation: "compact".
Remember
Intl.NumberFormat Intl.DateTimeFormat Pass locale like en-IN
ScriptVerse multi-region SaaS
Dashboard amounts render in INR for India tenants and USD for US tenants via Intl.
Outcome: Built-in Intl avoids hand-maintained locale format tables.
Interview prep for this lesson
Practice these questions aloud after reading—each links to a full structured answer.
Sign in to ask a question or upvote helpful answers.
No questions yet — be the first to ask!