SHARE
TWEET

Untitled

a guest Jun 19th, 2017 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function callback(n) {
  2.   console.log(n);
  3. }
  4.  
  5. function getN(callback) {
  6.   var n=0;
  7.  
  8.   get('data', {num:10}, function(res) {
  9.     n=n*res;
  10.   });
  11.  
  12.   setTimeout(function() {
  13.     n=n*2;
  14.   },0);
  15.  
  16.   n=n+2;
  17.   callback(n);
  18. };
  19. getN(callback);
RAW Paste Data
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top