The Ternary Operator is a more advanced operator in computer programming that is an alternative to an if-else statement. The ternary operator is just a question mark (a ?) and the syntax is condition ? value1 : value2 where condition is one that you would normally put in an if statement. Ternary Operator is useful in not only Khan Academy's Processing JavaScript environment, but in many programming languages such as JavaScript and C++. There can also be a ternary operator within a ternary operator.

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.