Can someone help me reverse this logic?
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) {}
I would like the statement to read as follows:
If user agent is NOT iPhone or NOT iPod
Right now I’m just leaving the first IF blank and using an ELSE, but I know there has to be a better solution.
Is there an opposite to .match?
Thanks!
1 Answer