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.
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.