I want the numbers to increase when a button is clicked. But I want to do this with a ratio of + 0.6 Everything works fine, but after a while it breaks down. What is the reason of this?
3.1 / 3.7 / 4.3 / 4.8999999999999995 why not 4.9?
function arttir(){
var sonuc=document.getElementById("sonuc");
sonuc.value=Number(sonuc.value)+0.6;
}
<body>
<input type=button onclick="arttir()" value="+">
<input type="text" style="width: 200px" type="button" id="sonuc" value="3.1">
</body>
Thanks friends.