Monday, June 11, 2018

JavaScript - Ternary Operator

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

No comments:

Post a Comment