Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function requestPhoneCost () {
- var product = "iPhone 7";
- server.requestPrice(product);
- }
- server.onResponse(function(response) {
- //response contains only information about the price, but not
- //what product its for
- showResult( , response.price);
- });
- function showResult (product, cost) {
- alert(product + " costs " + response + "dollars");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement