Javascript Uint32Array toLocaleString()

Introduction

The Javascript Uint32Array toLocaleString() method converts the typed array to String for current locale.

Uint32Array.toLocaleString([locales [, options]]);
Parameter Optional Meaning
locales YesLocales to use
options Yes options to use

Using toLocaleString()

var uint = new Uint32Array([2000, 500, 8123, 12, 4212]);

let a = uint.toLocaleString(); 
console.log(a);/*from  www . j  a  v  a  2  s .  c o m*/

a = uint.toLocaleString('en-US');
console.log(a);

a = uint.toLocaleString('ja-JP', { style: 'currency', currency: 'JPY' });
console.log(a);



PreviousNext

Related