10.02.2018 Views

js_tutorial

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Javascript<br />

<br />

<br />

<br />

Output<br />

First Test Value : -1<br />

Second Test Value : -40<br />

Third Test Value : -1<br />

Fourth Test Value : 100<br />

pow ( )<br />

This method returns the base to the exponent power, that is, base exponent .<br />

Syntax<br />

Its syntax is as follows:<br />

Math.pow(base, exponent );<br />

Parameter Details<br />

<br />

base : The base number.<br />

<br />

exponents : The exponent to which to raise the base.<br />

Return Value<br />

Returns the base to the exponent power, that is, base exponent .<br />

Example<br />

Try the following example program.<br />

<br />

<br />

JavaScript Math pow() Method<br />

<br />

<br />

<br />

299

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!