BrainQuay.com
Computer Science Knowledge and Problem Solving
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
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment