Show content if logged in user is in userGroup1 OR userGroup2?
According to the docs, the userModel.isInGroup() method takes a "user group model, its handle, or ID" – in other words, it can only test for membership in a single group, not several.

What you want in this case is the or operator:

{% if currentUser and (currentUser.isInGroup('userGroup1') or currentUser.isInGroup('userGroup2')) %}
    {# secret content #}
{% endif %}