09 三元运算

<!DOCTYPE html>
<html>
<head>
    <title>三元运算</title>
</head>
<body>
    <script type="text/javascript">
        // (条件) ? run this code : run this code;
        var isresult = 1 > 2 ? '真的' : '假的';
        alert(isresult);

    </script>
</body>
</html>
原文地址:https://www.cnblogs.com/wuhui1222/p/14166907.html