Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

ternary if

// (condition) ? true : false;
//           or
// condition ? true : false;

var x = 15;
(x === 12) ? alert("Is 12") : alert("isn't 12");
Source by www.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #ternary
ADD COMMENT
Topic
Name
3+5 =