PeanutButterSolution
PeanutButterSolution

Reputation: 53

Why does JS method .toFixed(1) not round consistently?

Why does .toFixed() round differently in each of the following situations?

console.log((1.35).toFixed(1)); //1.4
console.log((6.35).toFixed(1)); //6.3

Upvotes: 1

Views: 78

Answers (0)

Related Questions