Skip to content

Instantly share code, notes, and snippets.

@animoplex
Last active June 29, 2020 17:14
Show Gist options
  • Save animoplex/65f4ba95c18868ca47d7c0e51700573f to your computer and use it in GitHub Desktop.
Save animoplex/65f4ba95c18868ca47d7c0e51700573f to your computer and use it in GitHub Desktop.
If, Else If, Or, And Statements - After Effects Expression by Animoplex
// If, Else If, Or, And Statements - Created by Animoplex: www.animoplex.com
// Examples of different conditional statements to use in After Effects expressions.
// Full Tutorial: https://www.youtube.com/watch?v=ppCF7jS1nAs&t=106s
// If Statement:
if ( a > b ) {
"A Wins!";
}
// If... Else Statement
if ( a > b ) {
"A Wins!";
} else {
"B Wins!";
}
// If... Else If... Else Statement:
if ( a > b ) {
"A Wins!";
} else if ( a < b ) {
"B Wins!";
} else {
"It's a Tie!";
}
// Ternary Statement:
a > b ? "A Wins!" : "B Wins!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment