Javascript always returns float numbers
问题 Thats my jquery code. And the variable "procenti" always return like 92.3076923076923 % long decimal number. I would like that number to be without the decimals, only 92%. I tried .toFixed() method but it doesnt works. When the equation is like procenti=(3/10)*100; == 30%, the number in html looks just what i want without decimals. for(var i=1; i<14; i++){ var zmage=parseFloat($('#zm'+i).text()); var odigrane=parseFloat($('#od'+i).text()); var procenti=0; if(zmage == 0){ $('#pr'+(i)).html(0 +