JavaScript Math pow() methodThe JavaScript math pow() method returns the base to the exponent power such as baseexponent. In other words, the base value (x) is multiplied with itself exponent times (y). SyntaxThe pow() method is represented by the following syntax: ParameterBase - The base number. Exponent - The number used to raise the base. ReturnThe value of base to the power of exponent. JavaScript Math pow() method exampleHere, we will understand pow() method through various examples. Example 1Let's see a simple example to print the power of given number. Test it NowOutput: 8 9.518269693579391 Example 2Let's see an example to understand the pow() method with different test cases. Test it NowOutput: 0.125 9 NaN 0.1050611121761507 Example 3Let's understand the pow() method with your own test cases. Test it Now
Next TopicJavaScript Math
|
JavaTpoint offers too many high quality services. Mail us on [email protected], to get more information about given services.
JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected]
Duration: 1 week to 2 week