[Solved] JavaScript “displays” float as integer [duplicate]


In JavaScript integers are always displayed without decimal point
to have the decimal use toFixed(number_of_digits_after_decimal)

so to solve

$(this).find('#TotMarks').html((totmarks/count).toFixed(1));

This will result what you want.

solved JavaScript “displays” float as integer [duplicate]