Skip to content

Instantly share code, notes, and snippets.

@minnacaptain
Last active July 26, 2021 06:09
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/c30d440a0d11daf6d348e8ec04c0e903 to your computer and use it in GitHub Desktop.
Save minnacaptain/c30d440a0d11daf6d348e8ec04c0e903 to your computer and use it in GitHub Desktop.
Parse the example data
const getContent = () => Deno.readTextFile('./example_data.txt')
const calculateAverageScore = (getContent: () => Promise<string>) => getContent().then(result => {
const lines = result.split("\n").map(l => l.split(","))
console.log(lines)
})
calculateAverageScore(getContent)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment