round.js 124 B

123456
  1. function myFunction(x) {
  2. /*var x = 0.00195;*/
  3. var m = -Math.floor( Math.log10(x) + 1);
  4. return m; // outputs 2
  5. }