Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript detect square number

var isSquare = function (n) {
    return n > 0 && Math.sqrt(n) % 1 === 0;
};
 
PREVIOUS NEXT
Tagged: #javascript #detect #square #number
ADD COMMENT
Topic
Name
1+1 =