Guest User

Untitled

a guest
Jun 19th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. getData = function(field, callback) {
  2. console.log('this would get the data from ' + field + ' then continue');
  3. db.getFromField(field, function(error, response) {
  4. if(!error) {
  5. data = response
  6. callback(data);
  7. callback('some data');
  8. }
  9. }
  10.  
  11. runner = function() {
  12. // get data from field, 'username'
  13. getData(username, function(data, callback) {
  14. console.log('now you have ' + data)
  15. })
  16. }
  17.  
  18. runner()
Add Comment
Please, Sign In to add comment