Skip to main content
100%

Loading Data with Fetch, Promises, Async & Await

✓ Published1🌍 Public
NNikhil Reddy Manda
Last edited May 18, 2021
Created on May 10, 2021
Forked from HTML Starter

This example demonstrates loading external data in the browser, specifically fetching a CSV file of CSS color names and values from a GitHub gist, and then displaying the raw text output in the console. The page itself is minimal, showing only a title and a message instructing the user to open the browser’s developer console to view the retrieved data. The core functionality uses JavaScript’s native `fetch` API combined with `async`/`await` constructs and Promises to handle the asynchronous request; the code also includes a commented-out alternative using nested `.then()` calls for comparison. The styling incorporates Google Fonts’ Roboto and Poppins via CSS `@import`.

AI-generated description

Loading Data with Fetch, Promises, Async & Await

MIT Licensed

Similar vizzes