I have this
code:
function sellByte()
{
if (player.bytes >= 1) {
player.bytes =
player.bytes - 1;
player.money = player.money + 0.10;
document.getElementById("bytes").innerHTML = "Bytes: " + player.bytes;
document.getElementById("money").innerHTML = "$" + player.money;
}
}
And
whenever I sell a Byte my money value ends up looking like $10.00000003 or something
along those lines, how would I go about rounding the money value UP every time this
function is run?
No comments:
Post a Comment