Below code demostrates usage of ternary operator:
var a = 108;
var b = 108;
console.log(a == b ? "equal" : "not equal")
Try it at: http://jsbin.com
var a = 108;
var b = 108;
console.log(a == b ? "equal" : "not equal")
Try it at: http://jsbin.com
No comments:
Post a Comment