JavaScript Intl ListFormat format() Method Last Updated : 24 May, 2023 Comments Improve Suggest changes Like Article Like Report The Intl.ListFormat.prototype.format() method is an inbuilt method in JavaScript that returns a string with a language-specific representation of the list. Syntax: listFormat.format([list]); Parameters: This method accepts a single parameter as mentioned above and described below: list: This parameter holds an iterable object, such as an Array. Return Value: This method returns a language-specific formatted string representing the elements of the list. The below examples illustrate the Intl.ListFormat.prototype.format() method in JavaScript: Example 1: In this example, we will return a string from an array using the Intl.ListFormat.prototype.format() method in JavaScript. javascript <script> const gfg = ['Geeks1', 'Geeks2', 'Geeks3', 'Geeks4']; const result1 = new Intl.ListFormat('en', { style: 'long', type: 'conjunction' }); console.log(result1.format(gfg)); const result2 = new Intl.ListFormat('db', { style: 'short', type: 'disjunction' }); console.log(result2.format(gfg)); const result3 = new Intl.ListFormat('en', { style: 'narrow', type: 'unit' }); console.log(result3.format(gfg)); </script> Output: "Geeks1, Geeks2, Geeks3, and Geeks4" "Geeks1, Geeks2, Geeks3, or Geeks4" "Geeks1 Geeks2 Geeks3 Geeks4" Example 2: In this example, we will return a string from an array using the Intl.ListFormat.prototype.format() method in JavaScript. javascript <script> const gfg = ['Geeks1', 'Geeks2', 'Geeks3', 'Geeks4']; const result1 = new Intl.ListFormat('hi', { style: 'long', type: 'conjunction' }); console.log(result1.format(gfg)); const result2 = new Intl.ListFormat('hi', { style: 'short', type: 'disjunction' }); console.log(result2.format(gfg)); const result3 = new Intl.ListFormat('hi', { style: 'narrow', type: 'unit' }); console.log(result3.format(gfg)); </script> Output: "Geeks1, Geeks2, Geeks3, और Geeks4" "Geeks1, Geeks2, Geeks3 या Geeks4" "Geeks1, Geeks2, Geeks3 Geeks4" We have a complete list of Javascript Intl methods, to check those please go through the Javascript Intl Complete Reference article. Supported Browsers: The browsers supported by Intl.ListFormat.prototype.format() method are listed below: Google Chrome 72 and aboveEdge 79 and aboveFirefox 78 and aboveOpera 60 and aboveSafari 14.1 and above Comment More infoAdvertise with us Next Article JavaScript Intl ListFormat format() Method S SHUBHAMSINGH10 Follow Improve Article Tags : JavaScript Web Technologies JavaScript-Methods JavaScript-Intl Similar Reads JavaScript Intl ListFormat formatToParts() Method The Intl.ListFormat.prototype.formatToParts() method is an inbuilt method in JavaScript that returns an Array of objects representing the different components that can be used to format a list of values in a locale-aware fashion. Syntax: Intl.ListFormat.prototype.formatToParts(list) Parameters: This 2 min read JavaScript Intl ListFormat() Constructor JavaScript Intl.ListFormat() Constructor is used for creating Intl.ListFormat object. This constructor is created using the new keyword. If we create the constructor without the new keyword it will give a TypeError. Syntax: new Intl.ListFormat(loc, opt) Parameters: It has two parameters both are opt 2 min read JavaScript Intl DateTimeFormat format() Method The Intl.DateTimeFormat format() method in JavaScript formats dates and times according to a specified locale and options. It allows you to customize the output with settings for timezone, date, time, and more, making it ideal for creating locale-sensitive and readable date-time strings.Syntax: Intl 3 min read JavaScript Intl.NumberFormat() Constructor The Javascript Intl.NumberFormat() constructor is used to create Intl.NumberFormat() object that enables language-sensitive number formatting. This constructor is created with or without a new keyword both create a new Intl.NumberFormat instance. Syntax: new Intl.NumberFormat() new Intl.NumberFormat 2 min read JavaScript Intl DateTimeFormat formatToParts() Method The Intl.DateTimeFormat.prototype.formatToParts() method is an inbuilt method in JavaScript which allows locale-aware formatting of strings produced by DateTimeFormat formatters. Syntax: dateTimeFormat.formatToParts( date ) Parameters: This method accepts a single parameter as mentioned above and de 2 min read PHP | IntlDateFormatter format() Function The IntlDateFormatter::format() function is an inbuilt function in PHP which is used to format the date/time value as a string. Syntax: Object oriented style: string IntlDateFormatter::format( mixed $value ) Procedural style: string datefmt_format( IntlDateFormatter $fmt, mixed $value ) Parameters: 2 min read MessageFormat format() method in Java with Example : Set - 1 The format() method of java.text.MessageFormat class is used to get the formatted array of object appended into the string buffer object. formatted array will contain all forms of element lies in the pattern of MessageFormat object.Syntax: public final StringBuffer format(Object[] arguments, StringB 3 min read MessageFormat format() method in Java with Example : Set - 2 The format() method of java.text.MessageFormat class is used to get the formatted array of object according to the specified pattern of message format object. new string pattern will be considered while performing the action.Syntax: public static String format(String pattern, Object... arguments) Pa 2 min read Java String format() Method In Java, the String.format() method allows us to create a formatted string using a specified format string and arguments. We can concatenate the strings using this method, and at the same time, we can format the output with options such as width, alignment, decimal places, and more.Example: In the e 4 min read ChoiceFormat format() method in Java with Examples The format() method of java.text.ChoiceFormat class is used to get the appended string builder of the format value of particular limit value passed as parameter and text passed as parameter in this method. Syntax: public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition statu 2 min read Like