Home » » Conditional operator in Javascript Example

Conditional operator in Javascript Example

Conditional operator in Javascript Example

Conditional operator in Javascript Example

Conditional operator (or) ternary operator symbol - ?, :

<html>
<head>
<title>
welcome
</title>
</head>
<body>
<script>
var a,b,c;
a=100;
b=50;
c=a>b?a:b;
document.write("The value of c is:"+c);
</script>
</body>

</html>

0 coment�rios:

Post a Comment

Link you don't want to vouch for Read more: https://html.com/seo/#ixzz5zVltiZ5g