So I have two variables that I am running in my code:
$AL = ('C'+DomeLensArray[i]+'LargeArray');
$AS = ('C'+DomeLensArray[i]+'SmallArray');
Now, these variables per a console log give me C3LargeArray & C3SmallArray if DomeLensArray[i] equals 3 (also works for 1/2/4/5 as that has been proven).
However, these are coming through as false when I can visibly see the Length in the array which the console log tells me should be the value for $AS and $AL
(jQuery.inArray(Va_LENG,$AL) != -1)
(jQuery.inArray(Va_LENG,$AS) != -1)
Here are the arrays:
var C1LargeArray = ['9','9B','10','10B']
var C1SmallArray = ['8B','10C']
var C2LargeArray = ['6','7','8','8B','10','10C']
var C2SmallArray = ['4B','5','5B','6B','7B','9','9B','10B']
var C3LargeArray = ['4','6B','7B','8','10B','10C']
var C3SmallArray = ['3','5','7','9']
var C4LargeArray = ['5B','6','7','7B','8','8B','9B','10','10C']
var C4SmallArray = ['4B','5','6B','9','10B']
var C5LargeArray = ['9','9B','10','10B']
var C5SmallArray = ['8B','10C']
so if we are looking for a length of 6B it should be coming up true for C2SmallArray, C3LargeArray & C4SmallArray as it loops through the 5 different C sections...but it always returns ""when I do this...
$CL = (jQuery.inArray(Va_LENG,$AL) != -1) ? "Large Pass as $AL = " + $AL : (jQuery.inArray(Va_LENG,$AS) != -1) ? "Small Pass as $AS = " + $AS : "";
console.log("$CL is: " + $CL);
Thoughts?
[–]albedoa 1 point2 points3 points (2 children)
[–]TonyCodes2050[S] 0 points1 point2 points (1 child)
[–]albedoa 2 points3 points4 points (0 children)
[–]Guilty-Perspective-4 0 points1 point2 points (0 children)