JS 优雅的取整

var a = ~~2.98 var b= 2.23 | 0 var c= 2.50 >> 0 console.log(a,b,c)//2,2,2
相关文章
相关标签/搜索