The goal of this assignment increase your understanding of asynchronous communication andthe JSON format.
Interaction Explanation
Create a page that uses XHR to communicate with an external URL and retrieve values inJSON and generate colour swatches based on the returned values.
? Include a button on the page that says “Request Swatch”.
? Clicking the button will trigger an XHR request to the colors.php file located in theAssignment folder on the website.
? You must include a passcode with value of secret! using the GET method
? You must take the response (JSON) and create a new color swatch box