JavaScript Reference/Javascript Methods/pow

Материал из Web эксперт
Версия от 11:22, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

"pow()" Example

   <source lang="javascript">
   

<html> <body> <button onclick="alert(Math.pow(2,2));">POW</button> </body> </html>


     </source>
   
  


"pow()" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | Applied_To |Math | +----------------+--------------------------------------------------------------+

     </source>
   
  


"pow()" Syntax, Parameters and Note

   <source lang="javascript">

Note: Calculate the power.

Syntax:

Math.pow(param1, param2) Parameters:

   param1   Required; the number to use as the base.
   param2   Required; the number to use as the exponent.
   
     
     </source>