Advertisement
Guest User

Untitled

a guest
May 3rd, 2015
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. function result(data){
  2. console.log(a);
  3. }
  4.  
  5. var a = 0;
  6.  
  7. ajax('...pre-cached-url..', result);
  8. a++;
  9.  
  10. /*
  11. What value for a will this code log?
  12. */
  13.  
  14. /*
  15. The answer:
  16. It depends... on whether the ajax request will travel the wire or just load data from the cache
  17. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement