Multiply by 100, floor
, divide by 100.
var n = 8.7456;
var result = Math.floor(n * 100) / 100; // 8.74
Edit: if you’re looking at this question after the fact, this is probably not what you want. It satisfies the odd requirement of having 8.7456
appear as 8.74
. See also the relevant comment.