<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<script>
function getThreeMax(x, y, z) {
return x > y ? (x > z ? x : z) : (y > z ? y : z);
}
max = getThreeMax(8, 0, 1)
console.log("最大值:", max);
</script>
</body>
</html>
JS三目运算比大小
正在统计阅读人数 正在统计字数
字号
发表评论
评论 0