Multiple ifs in another if.
Hi guys,
I want to add different ifs to one parent if.
If any of if's are met, then go and do the else.
Here is my code:
if (document.URL.indexOf("xxx.co.uk") != -1) { Site='xxx.co.uk' };
if (document.URL.indexOf("xxx.de") != -1) { Site='xxx.de' };
if (document.URL.indexOf("xxx.fr") != -1) { Site='xxx.fr' };
if (document.URL.indexOf("xxx.it") != -1) { Site='xxx.it' };
if (document.URL.indexOf("xxx.be") != -1) { Site='xxx.be' };
if (document.URL.indexOf("xxx.nl") != -1) { Site='xxx.nl' };
And I want if any of these were captures give an else
site='mobile-app'
How should I go with it?
Thanks,