The idea is determine by sqrt of `c-a*a`

is a integer or not

```
var judgeSquareSum = function(c) {
for(var i=Math.floor(Math.sqrt(c));i>=0;i--){
if(Number.isInteger(Math.sqrt(c-i*i)))
return true
}
return false
};
```