forked from bhoop77/JavaScript-test
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.js
More file actions
Latest commit
25 lines (19 loc) · 411 Bytes
/
Copy pathtest.js
File metadata and controls
25 lines (19 loc) · 411 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
varsyncWait=function(milliseconds){
varnow=newDate().getTime();
varstop=now+milliseconds;
while(stop>newDate().getTime()){
console.log('waiting...');
}
console.log('done!');
};
console.log('1');
varmyFunction=function(callback){
console.log('2');
setTimeout(callback,1);
console.log('3');
syncWait(1000);
};
myFunction(function(){
console.log('4');
});
console.log('5');