calling an array

calling an array

Hello friends. I have tried to work below codes;
How can the codes understand if a0's element is "b0", it calls b0 array. 
<script>
    a0=["a0","b0","a1"];
    b0=["b0","a0","b1","c0"];
    
$(".drag").on("click",function(){

    if($(this).attr("id")=="a0"){f=a0;}//I dont want to use

    jQuery.each( f, function( i, val ) {
      
        jQuery.each( f[f.lentgh+1], function( j, vals ) {
        
        });
        
    });
});
</script>
<div id="a0" class="drag">
<div id="b0" class="drag">