27 February 2017

Important concept or features in programming languages.

Ternary operator

Javascript: var result = (condition) ? (value1) : (value2) ; in this code, the 'var result' will have either 'value1' or 'value2' depend on the condition provided.

No comments:

Post a Comment