Last active
July 26, 2021 06:09
-
-
Save minnacaptain/c30d440a0d11daf6d348e8ec04c0e903 to your computer and use it in GitHub Desktop.
Parse the example data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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