This is what I have:
if (balance * 100 % 10 == 0) {
balance = balance + 0.00;
}
if (balance > 0) {
return name + ", $" + balance;
} else if (balance < 0) {
return name + ", -$" + -balance;
} else { // balance = 0
return name + ", $0.00";
}
I want to return "$4.80" but I keep getting "$4.8". How do I get the 0 at the end of the decimal?