Tenary operator : Operator « Language Basics « JavaScript DHTML
- JavaScript DHTML
- Language Basics
- Operator
Tenary operator
<html>
<head>
<title></title>
</head>
<body>
<script type="text/javascript">
var temp = prompt("Number");
temp > 100 ? alert("> 100") : alert("< 100");
</script>
</body>
</html>
Related examples in the same category