Math Pow function of Javascript calculates the value of base with exponential power. Math.pow Javascript function accepts two parameters x,y; first parameter x accepts value for base and second parameter y accepts value for power. Javascript Math.pow function evaluates the value for xy i.e. x power y or multiply base x for y times.
Math.pow(x,y);
Math pow function in the above syntax shows that pow function accepts two parameters. First parameter works as base to the second parameter as power.
<script language="javascript" type="text/javascript">
document.write(Math.pow(9,3) + "<br />");
</script>
Output:
16 16 729 -729 81
Above example shows the use of different sets of numbers with Javascript Math.pow function and returns the product of base x for y times.
Be the first to rate this post
Tags: javascript, javascript math.pow, javascript math functions, javascript math object, javascript math properties, javascript math.abs, javascript math.ceil, javascript math.floor, javascript math pow function, javascript math.log, javascript math.round, javascript math.sqrt, javascript math.random
10/11/2008 3:18:12 AM