You should check that fractional part of the number is 0.
Use
x==Math.ceil(x)
or
x==Math.round(x)
or something like that
You should check that fractional part of the number is 0.
Use
x==Math.ceil(x)
or
x==Math.round(x)
or something like that