The power ,square root & absolute in JavaScript:- Geniusofstudent


  • The pow() method returns the value of x to the power of y (x^y).
  • The abs() method returns the absolute value of a number.
  • The sqrt() method returns the square root of the given number. If the number is negative, NaN is returned.
  • The above three methods are return NaNvalue, if no argument is given.
  • Code:-


  • <!DOCTYPE html> 
    <html> 
     
    <head> 
     <meta name="viewport" content="width=device-width, initial-scale=1"> 
    </head> 
     
    <body> 
     <h1>power squar and abs</h1> 
     
     <input type="button" onclick="alert(Math.abs(23.300));" value="Math.abs(23.300)"> 
     <input type="button" onclick="alert(Math.pow(3,5));" value="Math.pow(3,5)"> 
     <input type="button" onclick="alert(Math.sqrt(100));" value="Math.sqrt(100)"> 
     
    </body> 
     
    </html>
    The power ,square root & absolute in JavaScript:- Geniusofstudent The power ,square root  & absolute in JavaScript:- Geniusofstudent Reviewed by Network security on July 11, 2019 Rating: 5

    No comments:

    Useful Information

    Powered by Blogger.