I want to display value of integer variable as 8.0 , but the output show only 8
var c = 8.0;
console.log(c);
Output: 8
I want to display value of integer variable as 8.0 , but the output show only 8
var c = 8.0;
console.log(c);
Output: 8
If you want to display it with the decimal you can use var c = 8.0; c.toFixed(1) which would output 8.0