You're a square!

JavaScript

var isSquare = function(n) {
  const sign = Math.sign(n);
  return sign != -1 && Math.sqrt(n) % 1 === 0;
}

Tags

  1. javascript (Private)
  2. 7-kyu (Private)
  3. codewars (Private)
  4. answer (Private)