Programming ConceptsAPI

An API (Application Programming Interface) defines how different software components should communicate with each other.

// Fetching data from an API
fetch('https://api.example.com/data')
  .then(response => response.json())
  .then(data => console.log(data));