How to use math.pow() method in javaScript

you can calculate the value of a base expression taken to a specified power with the help of math.pow() function. you can use this method like as:
Math.pow(base, exponent)
where base is the base value and exponent is the exponent value of the expression.


    <script language="JavaScript">
    function CalculateResult(){
        var Number1=document.form1.txtNumber1.value;
        var Number2=document.form1.txtNumber2.value;
        var result = Math.pow(txtNumber1, txtNumber2);
        document.form1.answer.value = result;
    <form name=form1>
    Enter Base number:
    <input type="text" name="txtNumber1">
    Enter exponent :
    <input type="text" name="txtNumber2">
    <input type="button" value="Calculate" onClick='CalculateResult()'>
    result :
    <input type="text" name="answer" size=10>