🌍 Public
Viewing a saved revision (read-only)
aa6669e86e914bfebb061110dde0c7e3
Fetch, async, await
This example demonstrates how to fetch and read a CSV file of CSS named colors using modern JavaScript async/await syntax. The code defines an `async` function that uses the built-in `fetch` API to request data from a GitHub gist URL, then returns the response as plain text via the `.text()` method. The fetched text is logged to the browser console for inspection. The example highlights the contrast between chained `.then()` callbacks and the more readable `async`/`await` approach for handling asynchronous data loading.
AI-generated descriptionReact Starter code.