Skip to content

Instantly share code, notes, and snippets.

@minnacaptain
Created July 23, 2021 12:41
Show Gist options
  • Save minnacaptain/bd710e68216c2a8ed2fc976d63574050 to your computer and use it in GitHub Desktop.
Save minnacaptain/bd710e68216c2a8ed2fc976d63574050 to your computer and use it in GitHub Desktop.
Get content from internet
const getContentFromInternet = () =>
fetch(
"https://raw.githubusercontent.com/minnacaptain/have-you-tried-deno-yet/master/example_data.txt",
).then((t) => t.text());
// calculateAverageScore is unchanged
console.log("Average score: " + await calculateAverageScore(getContentFromInternet));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment