console.log(Math.abs(-5)) 取绝对值
console.log(Math.round(5.1)) 取四舍五入 5.5 为中间值 取5
console.log(Math.ceil(5.1)) 取整数 +1
console.log(Math.floor(5.9)) 取整数
console.log(Math.max(1,4,2)) 取最大值
console.log(Math.min(-1,-4,-2)) 取最小值
console.log(Math.random())  取0-1之间的随机数
console.log((100.123).toFixed(1)) 取小数点后N位

最新文章

  1. ASP.NET MVC5+EF6+EasyUI 后台管理系统(60)-系统总结
  2. 移动端开发概览【webview和touch事件】
  3. Linux下C语言多线程,网络通信简单聊天程序
  4. Django 1.6.0 正式发布,大幅改进事务处理
  5. C++的try_catch异常
  6. .NET开发Windows Service程序 - Topshelf
  7. Javascript表格中搜索
  8. <math.h>与<float.h>
  9. C语言杂记 -- 简陋的<深入理解计算机系统>笔记
  10. WCF基于Cookie回传的系列(概述)
  11. TCP/IP详解之:TCP
  12. 浅谈WEB编辑器——HBuilder
  13. 【微信小程序】调用wx.request接口需要注意的问题
  14. JavaScript总结学习一:js中构造函数与普通函数的区别
  15. Variant does not reference an auomation object
  16. 判断qq号码 规律
  17. Python垃圾回收机制--完美讲解!
  18. Ubuntu16.04 创建和使用虚拟环境
  19. windows server 2012 配置多用户ftp服务器配置注意点
  20. java语言规范,main方法必须声明为public

热门文章

  1. Python出现Could not find a version that satisfies the requirement openpyxl (from versions: )
  2. 关于JavaScript中0、空字符串、'0'是true还是false的总结
  3. Tarjan-SCC-NOIP2015message
  4. 吴裕雄 python 机器学习——核化PCAKernelPCA模型
  5. TCP和UDP的一些注意事项
  6. Go_random
  7. Analog power pin UPF defination
  8. 【设计模式】UML类图及Java的类之间的关系
  9. 安卓开发:打印Log
  10. linux 命令——screen