KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
var path; for (var i = 0, c = paths.length; i < c; i++) { path = paths[i]; fs.lstat(path, function (error, stat) { console.log(path); // this outputs always the last element }); } How can I access the path variable, that was passed to fs.lstat function?
Tags (comma-separated)
Save Edits
Cancel