Grammarly is telling me I should put commas before and after "for example" when it comes in the middle of the sentence, but I don't think so. Let's take a look at some examples.
The party doesn't need to be expensive. We can use some accessories from last year for example, and invite only fifty people.
The above sentence is ok for me with only one comma, but not for Grammarly. Now, let's see when I think "for example" must be between commas.
I understand you hate parties. You could choose not to go, for example, if it wasn't your mother's party.
As you can see, if the second clause is the condition for something to happen, we must use commas before and after "for example".
Am I wrong?