JavaScript Reference/Javascript Methods/toExponential

Материал из Web эксперт
Перейти к: навигация, поиск

"toExponential()" Example

   <source lang="javascript">
   

<html> <body> <button onclick="var myNum = new Number(10000); alert(myNum.toExponential(1));"> 10000 exp </button> </body> </html>


     </source>
   
  


"toExponential()" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | Applied_To |Number | +----------------+--------------------------------------------------------------+

     </source>
   
  


"toExponential()" Syntax, Parameters and Note

   <source lang="javascript">

Note: Converts the value of a Number object into exponential notation.

Syntax:

numberName.toExponential(param1) Parameters:

   param1   Required; number of decimal places in the exponential notation. 
   
     
     </source>