JavaScript နံပါတ်သို့ အညွှန်းကိန်း()
ဥပမာ ၁
နံပါတ်တစ်ခုကို အညွှန်းကိန်းတစ်ခုအဖြစ် ပြောင်းပါ-
let num = 5.56789;
let n = num.toExponential();
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
toExponential() method သည် နံပါတ်တစ်ခုကို exponential notation အဖြစ်သို့ ပြောင်းပေးသည်။
ဥပမာ ၂
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 |
တန်ဖိုးကို ပြန်ပေးသည်။
ကိန်းဂဏန်းကို အညွှန်းကိန်းအဖြစ် ကိုယ်စားပြုသော စာတန်း။ |
Browser ပံ့ပိုးမှု
Number.constructor
ECMAScript3 (ES3) အင်္ဂါရပ်တစ်ခုဖြစ်သည်။
ES3 (JavaScript 1999) ကို ဘရောက်ဆာအားလုံးတွင် အပြည့်အဝ ပံ့ပိုးထားသည်။
Chrome | IE | Edge | Firefox | Safari | Opera |
Yes | Yes | Yes | Yes | Yes | Yes |