//函数返回值练习
//1.求任意2个数中的最大值,并返回
// function getMax() {
// let num1 = +prompt('请你输入第一个数:')
// let num2 = +prompt('请你输入第二个数:')
// num1 > num2 ? alert(`${num1}是最大值`) :alert(`${num2}是最大值`)
// }
// let max = getMax()
//函数返回值练习
// 2.求任意函数数组中的最大值并返回这个最大值
// function getMax(arr = [3,4,5,10,88]) {
// let max = arr[0]
// return for (let i = 1; i < arr.length;i++) {
// if (max < arr[i]) {
// max = arr[i]
// }
// }
// }
// let max = getMax()
// document.write(max)
//函数返回值练习
// 2.求任意函数数组中的最小值最大值并返回这个最小值最大值
// function getMaxMin(arr = [3,4,5,10,88]) {
// let max = arr[0]
// let min = arr[0]
// for (let i = 1; i < arr.length;i++) {
// if (max < arr[i]) {
// max = arr[i]
// }
// if (min > arr[i]) {
// min = arr[i]
// }
// }
// return max
// return min
// }
// let maxmin = getMaxMin()
// document.write(maxmin)
// 综合案例: 转换时间案例
// 需求:用户输入秒数,可以自动转换为时分秒
// 公式:①用户输入总秒数
// ②计算时分秒(封装函数)里面包含数字补0
// ③打印输出
// 公式:小时:h = parseInt(总秒数/60/60%24)
// 分 : m = parseInt(总秒数/60%60)
// 秒: s = parseInt(总秒数%60)
function getTime() {
let t = +prompt('请你输入秒数:')
function isT(t) {
num < 10 ? '0' + num : num
}
}
// 数字补零
num < 10 ? '0' + num : num
/* 11.九九乘法表 */
/* span {
display: inline-block;
width: 80px;
padding: 10px 20px;
margin: 2px;
border: 2px solid pink;
border-radius: 5px;
background-color: rgb(237, 213, 217);
color:#ae77d2;
box-shadow: 3px 3px 3px rgba(255, 192, 203,0.5);
} */
console