I created a function that will test to see if a given parameter is a square number.
Read about square numbers here: https://en.wikipedia.org/?title=Square_number
I went that route:
var isSquare = (n) => n === 0 ? true : n > 0 && Math.sqrt(n) % 1 === 0; console.log(isSquare(25)); console.log(isSquare(10)); console.log(isSquare(16));