Javascript BigUint64Array toLocaleString()

Introduction

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

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

Using toLocaleString()

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

let a = uint.toLocaleString(); 
console.log(a);// w w  w. j  a  v a2 s.  co m

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

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



PreviousNext

Related