Example usage:
More advanced examples:
Loop back and forth between two keyframes in After Effects
Apply the following expression to a property with at least two keyframes
Only loop the last two keyframes of an animation
To only loop back and forth between the final two keyframes of an animation, you need to use the optional numKeyframes value like so:
Only loop the last three keyframes of an animation
To loop between the last three keyframes, you need to use the optional numKeyframes value and set it to (3 - 1 = 2)
Only loop the last n keyframes of an animation
Where n is the number of keyframes you want to loop between, set the second value to (n - 1)