Number type variable for eg xxxx=0.200000585858;
how do i convert xxxx value a开发者_运维问答s 0.200?
please see Number::toFixed.
This should also work. But your question wasn't specific on wether you wanted the number to be rounded or not.
Math.round(xxxx*1000)/1000
精彩评论