Acepting only two types of extensions

I need help setting up the code to accept only two extensions. I got the below code from Appian. This way, it only accepts one, either PNG or JPG. How do I switch this so it can be accepting of PNG and JPG? 

validations:
a!localVariables( local!invalidExtensions: difference(upper(fv!files.extension), { "PNG", "JPG" }), if( length(local!invalidExtensions) > 0, "Attachments must be images. Remove: " & index(fv!files, "name", wherecontains(local!invalidExtensions, upper(fv!files.extension)), {}), "" ) )
Parents Reply Children
No Data

 Discussion posts and replies are publicly visible