Math.round



examples/js/round.js
"use strict";

var v = "3.14159265359";
console.log(v);                       // 3.14159265359
console.log(100 * v);                 // 314.159265359

console.log(Math.round(v));           // 3
console.log(Math.round(100 * v)/100); // 3.14

console.log(Math.round(3.9));         // 4
console.log(Math.round(3.5));         // 4
console.log(Math.round(3.49999999));  // 3