js round up decimal

JavaScript
var avg=10.55;
console.log(Math.round(avg)); //Prints 11function round(value, precision) {
    var multiplier = Math.pow(10, precision || 0);
    return Math.round(value * multiplier) / multiplier;
}Math.round(3.14159 * 100) / 100  // 3.14

3.14159.toFixed(2);              // 3.14 returns a string
parseFloat(3.14159.toFixed(2));  // 3.14 returns a number
Math.round(3.14159)  // 3
Math.round(3.5)      // 4
Math.floor(3.8)      // 3
Math.ceil(3.2)       // 4
round(12345.6789, -1) // 12350
round(12345.6789, -2) // 12300
Source

Also in JavaScript: