0

I am getting undefined in printing obj to the console. How to access the answer outside the function??

        var obj;
        d3.json("country.json",function(error,answer){
             obj = answer;

          });
        console.log(obj);
gst
  • 25
  • 4

0 Answers0