find square numbers js code example
Example 1: javascript squared
//squared numbers
Math.pow(x1, 2)
x1 * x1
x1 ** 2 // ES6 syntax
Example 2: javascript detect square number
var isSquare = function (n) {
return n > 0 && Math.sqrt(n) % 1 === 0;
};