I would like to return a string in blue if is_active is true, and return it in grey if it's false. I have tried a couple of thing but can't make it work..
t2_array = [5, 7, 9, 11, 13, 17, 22, 25, 26, 29, 31, 35, 36, 39, 40, 44, 55, 77];
function t2PrintSlice(beg, end, is_active) {
beg = t2_array.indexOf(5);
end = t2_array.indexOf(26);
is_active = t2_array.slice(beg, end).join(', ')+",";
if (is_active === true){
is_active.addClass("range");
}else{
is_active.addClass("transp");
}
return "";
}
I should return a slice of the array in a color based on true/false.