You know what, I feel dumb about the negative part, after you pointed it out, I remember seeing that. for some reason I thought about that at the very end and added it.
It’s been a while since I’ve taken a math class and seem to have forgotten that an integer is a whole number. Thank you so much, I was afraid to move forward since I didn’t understand this part.
BTW, a much simpler way to determine if a number is an integer is Number.isInteger(num). That method was also added in ES6, so it’s likely the solution author just didn’t know about it.