1.随机数:
//0~1之间的小数,包括0,不包括1
Math.random()
//输出区间(小数字~大数字)内的数
Math.random()*(大数字-小数字)+小数字
2.四舍五入
Math.round()
3.向上取整
Math.ceil()
4.向下取整
Math.floor()
5.平方根
Math.sqrt()
6.次方
Math.pow(2,4)//表示2的4次方
7.绝对值
Math.abs()
1.随机数:
//0~1之间的小数,包括0,不包括1
Math.random()
//输出区间(小数字~大数字)内的数
Math.random()*(大数字-小数字)+小数字
2.四舍五入
Math.round()
3.向上取整
Math.ceil()
4.向下取整
Math.floor()
5.平方根
Math.sqrt()
6.次方
Math.pow(2,4)//表示2的4次方
7.绝对值
Math.abs()