You are the in-house developer at W&W Window Washers.
The owner’s eccentric son, Malachi Window, appears at your desk one afternoon in a flush.
“We’ve signed up with a new payment platform, one that will be less inclined to pry into our… affairs.” He says.
“Right,” you agree, with some hesitation.
“You need to update our website to go through that vendor. Send the client’s payment information to the vendor, and when the vendor’s API sends a message back, send the order to our supplier,” explains Malachi.
You fire up your computer and get to work, but
there’s a problem.
JavaScript code executes all at once. There is no wait keyword in JavaScript that pauses before the next line of code. How can we know if the vendor approves the payment information before sending a message to the supplier?
Solution: Using asynchronous JavaScript, you can easily communicate with multiple APIs in a single computer program.
Not a member yet? Register now
Are you a member? Login now