जावास्क्रिप्ट संख्या से एक्सपोनेंशियल ()
उदाहरण 1
एक संख्या को एक घातीय संकेतन में परिवर्तित करें:
let num = 5.56789;
let n = num.toExponential();
परिभाषा और उपयोग
ToExponential () विधि एक संख्या को एक घातीय संकेतन में परिवर्तित करती है।
उदाहरण 2
let num = 5.56789;
let n = num.toExponential(3);
वाक्य - विन्यास
number.toExponential(x)
मापदंडों
Parameter | Description |
---|---|
x | Optional. An integer between 0 and 20 representing the number of digits in the notation after the decimal point. If omitted, it is set to as many digits as necessary to represent the value |
प्रतिलाभ की मात्रा
एक स्ट्रिंग, एक घातीय संकेतन के रूप में संख्या का प्रतिनिधित्व करता है। |
ब्राउज़र समर्थन
Number.constructor
एक ECMAScript3 (ES3) फीचर है।
ES3 (जावास्क्रिप्ट 1999) सभी ब्राउज़रों में पूरी तरह से समर्थित है:
Chrome | IE | Edge | Firefox | Safari | Opera |
Yes | Yes | Yes | Yes | Yes | Yes |