কম্পিউটার টিউটোরিয়াল

জাভাস্ক্রিপ্টে Math.sqrt() ফাংশন

Math.sqrt() ফাংশনটি একটি নম্বর গ্রহণ করে এবং তার বর্গমূল রিটার্ন করে। ইনপুট নেগেটিভ হলে NaN রিটার্ন করে।

সিনট্যাক্স

Math.sqrt(x)

উদাহরণ

<html> <head>    <title>JavaScript Example</title> </head> <body>    <script type="text/javascript">       var result = Math.sqrt(169);       document.write("Square root: "+result);    </script> </body> </html>

আউটপুট

Square root value of the given number: 13
  1. জাভাস্ক্রিপ্টে Math.tan() ফাংশন

  2. জাভাস্ক্রিপ্টে Math.sinh() ফাংশন

  3. জাভাস্ক্রিপ্টে Math.sin() ফাংশন

  4. জাভাস্ক্রিপ্ট Number() ফাংশন