excel - Roundup function javascript -
in excel, have function: roundup(number,num_digits)
is there same function in javascript?
please me.
because javascripts math.ceil function doesnt support digits, have make own. this:
function roundup(number, digits) { var factor = math.pow(10,digits); return math.ceil(number*factor) / factor }
Comments
Post a Comment