11 The ternary operator is used to conditionally assign a value to a variable. Some believe that the use of ternary operators leads to unclear code.
14 var foo = isBar ? baz : qux;
19 This rule disallows ternary operators.
21 Examples of **incorrect** code for this rule:
26 /*eslint no-ternary: "error"*/
28 var foo = isBar ? baz : qux;
31 return foo ? bar() : baz();
37 Examples of **correct** code for this rule:
42 /*eslint no-ternary: "error"*/