consider this code,
var hi = 'Hello';
1.First approach
setTimeout(function(){ doSomething(hi); },0);
2.Second approach
setTimeout(doSomething.bind(null,hi),0);
No comments:
Post a Comment