There is no such thing as a float or int basic types in JavaScript, only a number. So, there is no difference between 5.0 and 5.
If it is important to you (for whatever reason), you will need to store the value as a string then use parseFloat to extract the value.
For example:
var int = "5";
var float = "5.0";
console.log(int == float); // false
console.log(parseFloat(int) == parseFloat(float)); // true
How to print numbers to fixed number of decimal places
I've just spotted Zerstoren comment: "i get data from mongodb and want to print this data with strong typing."
The method toFixed can be used to print a number to fixed number of decimal places:
var num = 5;
console.log( num.toFixed(1) ); // 5.0
Numbertype.isFloat(1) == isFloat(1.0)?