console.log(Math.abs(1));
console.log(Math.abs(-1));
console.log(Math.abs('-1'));
console.log(Math.abs('-1'));
console.log(Math.floor(1.1));
console.log(Math.floor(1.9));
console.log(Math.ceil(1.1));
console.log(Math.ceil(1.9));
console.log(Math.round(1.1));
console.log(Math.round(1.5));
console.log(Math.round(1.9));
console.log(Math.round(-1.1));
console.log(Math.round(-1.9));
console.log(Math.round(-1.5));
console.log(Math.random());
function getrandom(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
console.log(getrandom(1,10));
var arr = ['赔钱虎','妲己','亚瑟','夏侯惇','张飞'];
console.log(arr[getrandom(0,arr.length - 1)])
console