A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/javascript/javascript-math-sqrt-method/ below:

JavaScript Math sqrt() Method - GeeksforGeeks

JavaScript Math sqrt() Method

Last Updated : 15 Jul, 2024

The JavaScript Math sqrt( ) Method in JavaScript is used to square the root of the number passed as a parameter to the function. 

Syntax:
Math.sqrt(value)
Parameters:

This method accepts a single parameter as mentioned above and described below: 

Return Value:

The square root of the number is passed as a parameter.

Example 1: Below is an example of the Math sqrt() Method. 

javascript
console.log(Math.sqrt(-2));
console.log(Math.sqrt(-2.56));        

Example 2:

JavaScript
console.log(Math.sqrt(4));
console.log(Math.sqrt(256));        

We have a complete list of Javascript Math Objects methods, to check those please go through this Javascript Math Object Complete reference article.

Supported Browsers:  We have a Cheat Sheet on Javascript where we covered all the important topics of Javascript to check those please go through Javascript Cheat Sheet-A Basic guide to JavaScript.

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4