This exercise is great for your ankles as it combines in and out movement. You can perform it if you have problems with your ankles, but it is important not to feel any pain during the exercise.
Sit on a chair and have your leg elevated with foot handing of the bed, chair or something similar.
Bring your foot inside and outside and repeat at least 30 seconds. Perform range of motion that is comfortable for you.