Reservations are three ways after the decimal point several of

    var the PI = 1213.141592653;   //   constant capital 
    the console.log (PI.toFixed (2 )); 
    the console.log (the parseInt (the PI * 100) / 100 );
     var STR the PI + = "";    // because the numbers can not be operation is first converted character 
    console.log (str.substr (0, str.indexOf ( ) + 3) ".");

Guess you like

Origin www.cnblogs.com/ustc-yy/p/12094965.html