Javascript: preserving 2 decimal places


var price='4.95';

var quantity=parseInt('3');

var res= ((price*quantity)).toFixed(2);

gs.print(res);

Comments

Popular posts from this blog

GlideRecord setValue

variable advanced reference qualifier example

URL link in addInfoMessage