Math: significant digits

hey folks, I am trying to get the two significant digits of a value. Anyone know how to do this?
for example, 23900 =>24000

I was trying to write it out as
Math.round(Math.log(Math.abs(value))/Math.LOG10E);

I don’t think it’s right.