Created
August 30, 2012 01:02
-
-
Save gquental/3521291 to your computer and use it in GitHub Desktop.
CW35 Hack Thursday - NodeJS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
var folders = []; | |
fs.readdir('pasta', function(err, data) { | |
folders = data; | |
console.log('------------------'); | |
console.log('dentro do callback'); | |
console.log(folders); | |
}); | |
console.log('------------------'); | |
console.log('fora do callback'); | |
console.log(folders); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment