Assuming none of your variables have a zero or null value, for example, if they're all strings, the shortest way to write variable checks is to just use them:
function blah (nation, service, slider)
{
if (nation && service && slider)
{
// do something...
}
}
If any of those vars have the value 0, false or null when set then this would not be the correct method. If you want the equivalent of the isset
function, you could use this:
function isset()
{
for (var i=0, l=arguments.length; i < l; i++)
{
if (typeof arguments[i] == "undefined" || typeof arguments[i] == "null")
return false;
}
return true;
}
Use it the same as you would the php function, e.g. isset(nation,service,slider);