Skip to content

Instantly share code, notes, and snippets.

@minnacaptain
Created July 23, 2021 13:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save minnacaptain/7bd35b3ec85e6bd3bc111e3ab6f79597 to your computer and use it in GitHub Desktop.
Save minnacaptain/7bd35b3ec85e6bd3bc111e3ab6f79597 to your computer and use it in GitHub Desktop.
Get the calculateAverageScore function from the internet
import { calculateAverageScore } from 'https://raw.githubusercontent.com/minnacaptain/have-you-tried-deno-yet/master/calculate.ts'
const getContentFromInternet = () =>
fetch(
"https://raw.githubusercontent.com/minnacaptain/have-you-tried-deno-yet/master/example_data.txt",
).then((t) => t.text());
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