This might be a bit of a long shot but here we go. I've got 6 different variables that I need to create different url parameters. So for example:
var A
var B
var C
var D
var E
var F
Now I need to basically account for all options between those 6. So for example for var A I'd neeed something like:
if (A != '' && B == '' && C == '' && D == '' && E == '' && F == '') {
url += A ;
}
else if (A != '' && B != '' && C == '' && D == '' && E == '' && F == '') {
url += A + "+" + B;
}
else if (A != '' && B != '' && C != '' && D == '' && E == '' && F == '') {
url += A + "+" + B + "+" + C;
}
And so on. So basically I'd need to go through all the combinations like the above example, which I'm currently doing manually and which works fine, but there must be a better way of doing this?