A heartwarming new video sees a dog teach a struggling baby how to crawl. Valerie Stevens-Scott from Atlanta, Georgia, filmed the family pet, Buddy, giving her seven-month-old daughter, Allie, an impromptu how-to session after he spotted her frustratingly waving her arms and legs around on the floor.
What is the Ternary Operator? The ternary operator is an operator that takes three arguments. The first argument is a comparison argument, the second is the result upon a true comparison, and the third is the result upon a false comparison. If it helps you can think of the operator as shortened way of writing an if-else statement.
The three operands are (a<b), 5 and 10. The first one is condition which when evaluates to TRUE results the ternary operator to return the second operand to left hand variable or third operand otherwise. Fun fact: Some versions of C allow this ternary operator to appear like binary as well. More at Elvis operator.