I need to check if a variable is a whole number and i have a lot of easy solutions.
The first one is
if (floor(foobar) == foobar)
And the other one is
if(d % 1 == 0)
The another one is convert this number to string and split by dot(.) and check second number is "00" of not
d.toString().split('.')[1/]=="00"
But i think it is not a best practice.
A lot of these type of way, i want a standerd solution which is acceptable by all.