🌍 Public
Viewing a saved revision (read-only)
4f22f77ca36f4321a155744fc13831e3
Fetching data
This example demonstrates asynchronous data fetching in the browser, retrieving a CSV file of CSS named colors from a GitHub gist and logging its contents to the console. It uses the Fetch API’s `fetch()` method and the response object’s `text()` method within an async/await function, followed by a `.then()` promise chain to handle the resolved text. The code shows a minimal setup with no visual output, focusing purely on the network request and text extraction workflow.
AI-generated descriptionSample of fetching data