Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- getData = function(field, callback) {
- console.log('this would get the data from ' + field + ' then continue');
- db.getFromField(field, function(error, response) {
- if(!error) {
- data = response
- callback(data);
- callback('some data');
- }
- }
- runner = function() {
- // get data from field, 'username'
- getData(username, function(data, callback) {
- console.log('now you have ' + data)
- })
- }
- runner()
Add Comment
Please, Sign In to add comment