Hidden listing
function fetchAndLog(url) { fetch(url) .then(function(response) { // The response is a Response instance. // You parse the data into a useable format using `.json()` return response.json(); }).then(function(data) { // data is the parsed version of the JSON returned from the above endpoint console.log(); // Insert a new line for clarity sake console.log(data); }); }
The architecture of modern information systems is made of software components written in various programming languages like JSON, which communicate over the wire by sending and receiving data represented in a language-independent data exchange format. DOP applies the same principle to the communication between inner parts of a program.