Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function result(data){
- console.log(a);
- }
- var a = 0;
- ajax('...pre-cached-url..', result);
- a++;
- /*
- What value for a will this code log?
- */
- /*
- The answer:
- It depends... on whether the ajax request will travel the wire or just load data from the cache
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement