css ternary expression code example
Example: ternary function javascript
var variable;
if (condition)
variable = "something";
else
variable = "something else";
//is the same as:
var variable = condition ? "something" : "something else";
var variable;
if (condition)
variable = "something";
else
variable = "something else";
//is the same as:
var variable = condition ? "something" : "something else";