score:0

Accepted answer

your first csv data is loading asynchronously, so this function will not return anything

functionthatreturnsarray(){
   d3.csv("http//url.com", function(){
       somemorecode;
       return arrayofstrings
   };)
}

you can put following code in function

function processarray(a){

   morecode;

   //for example, the first value from a is selected
   d3.csv(a[0], function(error, data) {
   morecode;
  })
}

and invoke this function in first csv loading callback

 functionthatreturnsarray(){
       d3.csv("http//url.com", function(){
           somemorecode;
           processarray(arrayofstrings) //add this
       };)
 }

Related Query