Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. function requestPhoneCost () {
  2. var product = "iPhone 7";
  3. server.requestPrice(product);
  4. }
  5.  
  6. server.onResponse(function(response) {
  7. //response contains only information about the price, but not
  8. //what product its for
  9.  
  10. showResult( , response.price);
  11.  
  12. });
  13.  
  14. function showResult (product, cost) {
  15. alert(product + " costs " + response + "dollars");
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement