Rui
0
Q:

square root in javascript


Math.sqrt(9);
 
2
let number = 16
Math.sqrt(number);
//output = 4
5
var x = Math.sqrt(num);
2
var isSquare = function (n) {
    return n > 0 && Math.sqrt(n) % 1 === 0;
};
2

Math.sqrt(9);
 //return square root of number
1
x = 9
y = x ** 0.5
3
let n = 64;
let root = 6;
Math.pow(n, 1/root);
//output 2;
1
sqrt("random number, do not put quotes"); //square root
-1

New to Communities?

Join the community