Format Scientific Notation

Format a number in scientific notation for large or small values.

Code

Utilities
new Intl.NumberFormat('en', { notation: 'scientific', maximumFractionDigits: 2 }).format(num);

Parameters

Number to format.

Browser·fetch() may be limited by CORS

More JavaScript Snippets