node-csvtojson icon indicating copy to clipboard operation
node-csvtojson copied to clipboard

asynchronous problems

Open zioposty opened this issue 6 years ago • 0 comments

Why this print before the "test" log?

 csv({delimiter:[';']}).fromFile("\castelli-campania.csv").then((jsonObj)=>{
        jsonObj.forEach(row => {
            words.push(row["Provincia"]);
            console.log(words.length)
        });
   })

 console.log("test" + words.length)

    

zioposty avatar Jul 23 '19 14:07 zioposty