UNB/ CS/ David Bremner/ teaching/ cs2613/ books/ mdn/ Reference/ Global Objects/ Intl/ ListFormat/ Intl.ListFormat.prototype.resolvedOptions()

The resolvedOptions() method of Intl.ListFormat instances returns a new object with properties reflecting the locale and style formatting options computed during the construction of this Intl.ListFormat object.

Syntax

resolvedOptions()

Parameters

None.

Return value

An object with properties reflecting the locale and formatting options computed during the construction of the given Intl.ListFormat object.

Description

The object returned by resolvedOptions() has the following properties:

Examples

Using resolvedOptions

const deListFormatter = new Intl.ListFormat("de-DE", { style: "short" });

const usedOptions = de.resolvedOptions();
console.log(usedOptions.locale); // "de-DE"
console.log(usedOptions.style); // "short"
console.log(usedOptions.type); // "conjunction" (the default value)

Specifications

Browser compatibility

See also