InterviewHubPRO
Section Overview
Q237

Question 237 of 521

Part 4: Prototypes, Object Methods & Event Loop (174 - 253)

45%
JavaScript Internals (521 Qs)•Part 4: Prototypes, Object Methods & Event Loop (174 - 253)

What is the Intl object

The Intl object is the namespace for the ECMAScript Internationalization API, which provides language sensitive string comparison, number formatting, and date and time formatting. It provides access to several constructors and language sensitive functions.

Practical Code Example

javascript
// Intl Object: ECMAScript Internationalization API namespace
const date = new Date(Date.UTC(2026, 10, 6, 12, 0, 0));

// Formats dates according to German locale
console.log(new Intl.DateTimeFormat('de-DE').format(date)); // '6.11.2026'

// Formats currencies according to US Dollar
console.log(new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' }).format(1250.5));
// '$1,250.50'