Skip to content

Latest commit

 

History

History
5 lines (3 loc) · 212 Bytes

JsQuestionMarkOperator.markdown

File metadata and controls

5 lines (3 loc) · 212 Bytes

The ternary operator is identical in Javascript as it is in Ruby.

value 1 ? val2 : val3

reads if value 1 is true than val2 else val3. Really quick way to build a single step if-else statement in one line.