How to send GET and POST Ajax API requests in Vanilla JavaScript

Ajax is short for asynchronous JavaScript and XML and is a mechanism for updating a part of a page.…