<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
</body>
<script>
// 三目运算符、三元表达式
// ? :
if(true){
//true
}else{
//false
}
var a = 10;
var b = 20;
//a 是否 大于b 成立输出a 否则输出b;
if(a>b){
console.log(a)
}else{
console.log(b)
}
var num = a>b? a : b;
console.log(num);
</script>
</html>