Yes, I agree with the previous answer.
It can be for serious offenses or criminal acts, and also giving and receiving bad attitudes.
For instance, GIVING someone "a taste of their own medicine" is taking revenge. When you intentionally mistreat someone in the same way they have mistreated you, and they don't like it.
I personally don't agree with taking revenge, in any form.